Skip to content

Commit

Permalink
Avoid Ctx API in HIP backend
Browse files Browse the repository at this point in the history
  • Loading branch information
gsitaram committed Sep 5, 2024
1 parent 3d55499 commit b9465e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/acc/cuda_hip/acc_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ extern "C" int c_dbcsr_acc_init() {
ACC_DRV(device) acc_device;
ACC_API_CALL(GetDevice, (&myDevice));
ACC_DRV_CALL(DeviceGet, (&acc_device, myDevice));
#if defined(__CUDA)
ACC_DRV(context) ctx;
ACC_DRV_CALL(DevicePrimaryCtxRetain, (&ctx, acc_device));
#endif
ACC_API_CALL(RuntimeGetVersion, (&runtimeVersion));

// Initialize libsmm_acc, DBCSR's GPU backend
Expand All @@ -41,6 +43,8 @@ extern "C" int c_dbcsr_acc_finalize() {
ACC_DRV(device) acc_device;
ACC_API_CALL(GetDevice, (&myDevice));
ACC_DRV_CALL(DeviceGet, (&acc_device, myDevice));
#if defined(__CUDA)
ACC_DRV_CALL(DevicePrimaryCtxRelease, (acc_device));
#endif
return libsmm_acc_finalize();
}

0 comments on commit b9465e3

Please sign in to comment.