Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions include/RI/global/gpu/GPU_Backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ inline void validate_local_gpu_count(const MPI_Comm& communicator)

int device_count = 0;
#ifdef __DDLA_RI
ddla::DEVICE_CHECK_RI(ddla::deviceGetDeviceCount(&device_count));
ddla::DEVICE_CHECK(ddla::deviceGetDeviceCount(&device_count));
#elif defined(__MAGMA_RI)
device_count = Magma_Wrapper::magma_get_size();
#endif
Expand Down Expand Up @@ -174,7 +174,7 @@ inline void allocate(T** pointer, std::size_t count)
return;
}
#ifdef __DDLA_RI
ddla::DEVICE_CHECK_RI(ddla::deviceMalloc(pointer, count * sizeof(T)));
ddla::DEVICE_CHECK(ddla::deviceMalloc(pointer, count * sizeof(T)));
#elif defined(__MAGMA_RI)
MAGMA_CHECK_RI(magma_malloc(reinterpret_cast<void**>(pointer), count * sizeof(T)));
#endif
Expand All @@ -186,7 +186,7 @@ inline void free(T* pointer)
if (pointer == nullptr)
return;
#ifdef __DDLA_RI
ddla::DEVICE_CHECK_RI(ddla::deviceFree(pointer));
ddla::DEVICE_CHECK(ddla::deviceFree(pointer));
#elif defined(__MAGMA_RI)
MAGMA_CHECK_RI(magma_free(pointer));
#endif
Expand All @@ -199,7 +199,7 @@ inline void upload(
if (count == 0)
return;
#ifdef __DDLA_RI
ddla::DEVICE_CHECK_RI(deviceMemcpyAsync(
ddla::DEVICE_CHECK(deviceMemcpyAsync(
device_data, host_data, count * sizeof(T),
ddla::deviceMemcpyHostToDevice, stream(queue)));
#elif defined(__MAGMA_RI)
Expand All @@ -215,7 +215,7 @@ inline void download(
if (count == 0)
return;
#ifdef __DDLA_RI
ddla::DEVICE_CHECK_RI(deviceMemcpyAsync(
ddla::DEVICE_CHECK(deviceMemcpyAsync(
host_data, device_data, count * sizeof(T),
ddla::deviceMemcpyDeviceToHost, stream(queue)));
#elif defined(__MAGMA_RI)
Expand All @@ -229,7 +229,7 @@ inline void memset(void* pointer, int value, std::size_t bytes, Queue queue)
if (bytes == 0)
return;
#ifdef __DDLA_RI
ddla::DEVICE_CHECK_RI(deviceMemsetAsync(
ddla::DEVICE_CHECK(deviceMemsetAsync(
pointer, value, bytes, stream(queue)));
#elif defined(__MAGMA_RI)
MAGMA_CHECK_RI(magma_memset(pointer, value, bytes));
Expand All @@ -239,7 +239,7 @@ inline void memset(void* pointer, int value, std::size_t bytes, Queue queue)
inline void sync(Queue queue)
{
#ifdef __DDLA_RI
ddla::DEVICE_CHECK_RI(
ddla::DEVICE_CHECK(
ddla::deviceStreamSynchronize(stream(queue)));
#elif defined(__MAGMA_RI)
magma_queue_sync(queue);
Expand Down
3 changes: 2 additions & 1 deletion include/RI/ri/LRI-cal_loop3_GPU.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2690,7 +2690,8 @@ void LRI<TA,Tcell,Ndim,Tdata>::cal_loop3_GPU(
LRI_Cal_Aux::add_Ds_omp_wait_map(Ds_result_thread, Ds_result, lock_Ds_result_add_map, fac_add_Ds);
} // end #pragma omp parallel

LRI_Cal_Aux::destroy_lock_result(lock_Ds_result_add_map, Ds_result);
LRI_Cal_Aux::destroy_lock(lock_Ds_result_add_map);
LRI_Cal_Aux::destroy_Ds_result(Ds_result);
#ifdef __MKL_RI
mkl_set_num_threads(mkl_threads);
#endif
Expand Down