refactor(kernel): split Common.py to a separate package

This commit is contained in:
Anthony Berg 2025-06-24 17:35:42 +02:00
parent c54f08c417
commit ae23145753
2 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ import pycuda.gpuarray
import pycuda.driver as cuda
from GPUSimulators import Autotuner
from GPUSimulators.common import common
from GPUSimulators.common import Timer
class CudaContext(object):
@ -274,7 +274,7 @@ class CudaContext(object):
file.write(kernel_string)
with Common.Timer("compiler") as timer:
with Timer("compiler") as timer:
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore", message="The CUDA compiler succeeded, but said the following:\nkernel.cu", category=UserWarning)

View File

@ -5,7 +5,7 @@ import os.path
import hip as hip_main
from hip import hip
from GPUSimulators.common import common
from GPUSimulators.common import Timer
from GPUSimulators.gpu.context import Context
@ -137,7 +137,7 @@ class HIPContext(Context):
with io.open(cached_kernel_filename + ".txt", "w") as file:
file.write(kernel_string)
with Common.Timer("compiler") as timer:
with Timer("compiler") as timer:
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore", message="The CUDA compiler succeeded, but said the following:\nkernel.cu", category=UserWarning)