mirror of
				https://github.com/smyalygames/FiniteVolumeGPU.git
				synced 2025-10-31 20:17:41 +01:00 
			
		
		
		
	refactor(kernel): split Common.py to a separate package
This commit is contained in:
		
							parent
							
								
									c54f08c417
								
							
						
					
					
						commit
						ae23145753
					
				| @ -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) | ||||
|  | ||||
| @ -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) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Anthony Berg
						Anthony Berg