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
2 changes: 1 addition & 1 deletion sw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ if(EN_GPU)
)

# Add GPU libraries
target_link_libraries(Coyote PUBLIC hip::device numa pthread drm drm_amdgpu rt dl hsa-runtime64 hsakmt)
target_link_libraries(Coyote PUBLIC hip::device numa pthread drm drm_amdgpu rt dl hsa-runtime64 hsakmt rocm_smi64)
endif()

##############################
Expand Down
1 change: 1 addition & 0 deletions sw/include/coyote/cGpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <stdexcept>

#include <hsa.h>
#include <hip/hip_runtime.h>
#include <hsa/hsa_ext_amd.h>

namespace coyote {
Expand Down
5 changes: 2 additions & 3 deletions sw/src/cThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,8 @@ void* cThread::getMem(CoyoteAlloc&& alloc) {
#endif

// Allocate the GPU memory
err = hsa_memory_allocate(*info_params.region, alloc.size, (void **) &(mem));
if (err != HSA_STATUS_SUCCESS) {
std::cerr << "ERROR: cThread::getMem() - Failed to allocate GPU memory!" << std::endl;;
if (hipMalloc((void **) &mem, alloc.size)) {
std::cerr << "ERROR: cThread::getMem() - hipMalloc failed to allocate GPU memory!" << std::endl;;
return nullptr;
}

Expand Down