Skip to content

[SYCL][ROCm] Build lld when ROCm for AMD is enabled #4402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2021
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
3 changes: 3 additions & 0 deletions buildbot/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ def do_configure(args):
if args.rocm_platform == 'AMD':
llvm_targets_to_build += ';AMDGPU'
libclc_targets_to_build += ';amdgcn--;amdgcn--amdhsa'

# The ROCm plugin for AMD uses lld for linking
llvm_enable_projects += ';lld'
elif args.rocm_platform == 'NVIDIA' and not args.cuda:
llvm_targets_to_build += ';NVPTX'
libclc_targets_to_build += ';nvptx64--;nvptx64--nvidiacl'
Expand Down
3 changes: 3 additions & 0 deletions sycl/plugins/rocm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ if("${SYCL_BUILD_PI_ROCM_PLATFORM}" STREQUAL "AMD")

# Set HIP define to select AMD platform
target_compile_definitions(pi_rocm PRIVATE __HIP_PLATFORM_AMD__)

# Make sure lld is built as part of the toolchain
add_dependencies(sycl-toolchain lld)
elseif("${SYCL_BUILD_PI_ROCM_PLATFORM}" STREQUAL "NVIDIA")
# Import CUDA libraries
find_package(CUDA REQUIRED)
Expand Down