diff --git a/GPUSimulators/EE2D_KP07_dimsplit.py b/GPUSimulators/EE2D_KP07_dimsplit.py index 0429b28..935eb90 100644 --- a/GPUSimulators/EE2D_KP07_dimsplit.py +++ b/GPUSimulators/EE2D_KP07_dimsplit.py @@ -108,7 +108,7 @@ class EE2D_KP07_dimsplit (BaseSimulator): #self.kernel = module.get_function("KP07DimsplitKernel") #self.kernel.prepare("iiffffffiiPiPiPiPiPiPiPiPiPiiii") # - kernel_file_path = os.path.abspath(os.path.join('cuda', 'EE2D_KP07_dimsplit.cu')) + kernel_file_path = os.path.abspath(os.path.join('cuda', 'EE2D_KP07_dimsplit.cu.hip')) with open(kernel_file_path, 'r') as file: kernel_source = file.read() diff --git a/GPUSimulators/FORCE.py b/GPUSimulators/FORCE.py index 22a1593..ebf4416 100644 --- a/GPUSimulators/FORCE.py +++ b/GPUSimulators/FORCE.py @@ -88,7 +88,7 @@ class FORCE (Simulator.BaseSimulator): self.g = np.float32(g) #Get kernels -# module = context.get_module("cuda/SWE2D_FORCE.cu", +# module = context.get_module("cuda/SWE2D_FORCE.cu.hip", # defines={ # 'BLOCK_WIDTH': self.block_size[0], # 'BLOCK_HEIGHT': self.block_size[1] @@ -187,15 +187,14 @@ class FORCE (Simulator.BaseSimulator): ) ) ) - - self.u0, self.u1 = self.u1, self.u0 + self.u0, self.u1 = self.u1, self.u0 - hip_check(hip.hipDeviceSynchronize()) - hip_check(hip.hipModuleUnload(module)) + hip_check(hip.hipDeviceSynchronize()) + hip_check(hip.hipModuleUnload(module)) + + hip_check(hip.hipFree(cfl_data)) - hip_check(hip.hipFree(cfl_data)) - - print("--Launching Kernel .FORCEKernel. is ok") + print("--Launching Kernel .FORCEKernel. is ok") def getOutput(self): return self.u0