From ae231457535d1001510915afb5b9b48d1a886d39 Mon Sep 17 00:00:00 2001 From: Anthony Berg Date: Tue, 24 Jun 2025 17:35:42 +0200 Subject: [PATCH] refactor(kernel): split Common.py to a separate package --- GPUSimulators/gpu/cuda_context.py | 4 ++-- GPUSimulators/gpu/hip_context.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/GPUSimulators/gpu/cuda_context.py b/GPUSimulators/gpu/cuda_context.py index b22a72d..a9d6219 100644 --- a/GPUSimulators/gpu/cuda_context.py +++ b/GPUSimulators/gpu/cuda_context.py @@ -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) diff --git a/GPUSimulators/gpu/hip_context.py b/GPUSimulators/gpu/hip_context.py index 57ce835..72d1647 100644 --- a/GPUSimulators/gpu/hip_context.py +++ b/GPUSimulators/gpu/hip_context.py @@ -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)