Skip to content

[SYCL][ROCM] amdgcn flag shows lld errors #4468

Closed
@zjin-lcf

Description

@zjin-lcf

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

referenced by lto.tmp:(typeinfo name for cl::sycl::detail::AssertInfoCopier)

lld: error: undefined symbol: SCRATCH_RSRC_DWORD1

referenced by lto.tmp:(typeinfo name for cl::sycl::detail::AssertInfoCopier)
llvm-foreach:

llvm-foreach:
clang-14: error: amdgcn-link command failed with exit code 1 (use -v to see invocation)
m

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghipIssues related to execution on HIP backend.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions