File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ if(EN_GPU)
152152 )
153153
154154 # Add GPU libraries
155- target_link_libraries (Coyote PUBLIC hip::device numa pthread drm drm_amdgpu rt dl hsa-runtime64 hsakmt)
155+ target_link_libraries (Coyote PUBLIC hip::device numa pthread drm drm_amdgpu rt dl hsa-runtime64 hsakmt rocm_smi64 )
156156endif ()
157157
158158##############################
Original file line number Diff line number Diff line change 3434#include < stdexcept>
3535
3636#include < hsa.h>
37+ #include < hip/hip_runtime.h>
3738#include < hsa/hsa_ext_amd.h>
3839
3940namespace coyote {
Original file line number Diff line number Diff line change @@ -486,9 +486,8 @@ void* cThread::getMem(CoyoteAlloc&& alloc) {
486486 #endif
487487
488488 // Allocate the GPU memory
489- err = hsa_memory_allocate (*info_params.region , alloc.size , (void **) &(mem));
490- if (err != HSA_STATUS_SUCCESS) {
491- std::cerr << " ERROR: cThread::getMem() - Failed to allocate GPU memory!" << std::endl;;
489+ if (hipMalloc ((void **) &mem, alloc.size )) {
490+ std::cerr << " ERROR: cThread::getMem() - hipMalloc failed to allocate GPU memory!" << std::endl;;
492491 return nullptr ;
493492 }
494493
You can’t perform that action at this time.
0 commit comments