mirror of
https://github.com/smyalygames/FiniteVolumeGPU_HIP.git
synced 2025-05-18 06:24:11 +02:00
Merge branch 'porting-to-hip' of https://github.com/HichamAgueny/FiniteVolumeGPU_HIP into porting-to-hip
This commit is contained in:
commit
6a11b0e3ab
@ -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()
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user