Skip to content

Commit

Permalink
Fixes for static build. (#878)
Browse files Browse the repository at this point in the history
  • Loading branch information
daineAMD authored Jun 7, 2024
1 parent aa9247c commit c8c7231
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ if(DEFINED USE_CUDA)
endif()

# Hip headers required of all clients; clients use hip to allocate device memory
if( NOT BUILD_SHARED_LIBS )
# potentially a bug in hip, if AMDGPU_TARGETS is not set, it uses amdgpu-arch to find
# archs on the machine, but doesn't work with static builds
# trying this workaround out for now
set (AMDGPU_TARGETS "gfx000")
endif()
find_package( hip CONFIG PATHS ${HIP_DIR} ${ROCM_PATH} /opt/rocm )

# support for cuda backend with hip < 6.0
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ fi

# this can be removed and be done in rmake.py once --cuda flag support is gone
if [[ "${build_cuda}" != true ]]; then
export HIP_PLATFORM="$(hipconfig --platform)"
export HIP_PLATFORM="$(${rocm_path}/bin/hipconfig --platform)"
fi

if [[ "${rmake_invoked}" == false ]]; then
Expand Down

0 comments on commit c8c7231

Please sign in to comment.