-
Notifications
You must be signed in to change notification settings - Fork 745
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
[SYCL][ROCM] amdgcn flag shows lld errors #4468
Comments
This is most likely due to dropping |
It is fine with or without "-sycldevice". Thanks. |
Right. The warning message is misleading. It applies to the triples with SPIR target only. I'll try to fix the warning. |
Today DPC++ compiler requires users to set "sycldevice" target triple component to separate SYCL compilation mode for SPIR target from other compilation mode (e.g. OpenCL). Triple environment component is not intended to be used in such context and this patch removes `sycldevice`. This patch also preserves backward compatibility with binaries built using old versions of the compiler, which enforced `sycldevice` environment component of the target triple. It's provided by `clang-offload-bundler` tool, which now implicitly looks for the additional SYCL offload kind bundle with a "legacy" triple. A driver warning was added to let users know that `sycldevice` environment component is ignored now.
Because of the message "clang-14: warning: argument 'amdgcn-amd-amdhsa-sycldevice' is deprecated, use 'amdgcn' instead [-Wdeprecated]",
changing the argument shows the following error for a few SYCL programs. Could you reproduce the error using any SYCL program ?
clang++ -fsycl-unnamed-lambda -fsycl -fsycl-targets=amdgcn -Xsycl-target-backend --offload-arch=gfx9xx -O3 main.o -o main
lld: error: :0:0: in function _ZTSZZ4mainENKUlRN2cl4sycl7handlerEE_clES2_E1k void (i32 addrspace(1)*, i64, i64, i64): unsupported hsa intrinsic without hsa target
lld: error: lto.tmp:(function typeinfo name for cl::sycl::detail::AssertInfoCopier: .text._ZTSN2cl4sycl6detail16AssertInfoCopierE+0x60): internal linker error: cannot read addend for relocation R_AMDGPU_GOTPCREL32_LO
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
lld: error: lto.tmp:(function typeinfo name for cl::sycl::detail::AssertInfoCopier: .text._ZTSN2cl4sycl6detail16AssertInfoCopierE+0x68): internal linker error: cannot read addend for relocation R_AMDGPU_GOTPCREL32_HI
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
lld: error: undefined symbol: SCRATCH_RSRC_DWORD0
lld: error: undefined symbol: SCRATCH_RSRC_DWORD1
llvm-foreach:
clang-14: error: amdgcn-link command failed with exit code 1 (use -v to see invocation)
m
The text was updated successfully, but these errors were encountered: