Closed
Description
Describe the bug
test-e2e/Basic/reqd_work_group_size_check_exception.cpp fails on hip
See: https://github.com/intel/llvm/actions/runs/4892475978/jobs/8734708895
I turned it off during the review to pass CI tests.
Fail backtrace
$ "/__w/llvm/llvm/toolchain/bin/clang++" "-Xsycl-target-backend=amdgcn-amd-amdhsa" "--offload-arch=gfx1031" "-fsycl" "-fsycl-targets=amdgcn-amd-amdhsa" "/__w/llvm/llvm/llvm/sycl/test-e2e/Basic/reqd_work_group_size_check_exception.cpp" "-o" "/__w/llvm/llvm/build-e2e/Basic/Output/reqd_work_group_size_check_exception.cpp.tmp.out" # command stderr: lld: /__w/llvm/llvm/src/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:161: virtual void llvm::AMDGPUAsmPrinter::emitEndOfAsmFile(llvm::Module&): Assertion `Success && "Malformed HSA Metadata"' failed. PLEASE submit a bug report to https://github.com/intel/llvm/issues and include the crash backtrace. Stack dump: 0. Program arguments: /__w/llvm/llvm/toolchain/bin/lld -flavor gnu -m elf64_amdgpu --no-undefined -shared -plugin-opt=-amdgpu-internalize-symbols -plugin-opt=mcpu=gfx1031 -o /tmp/lit-tmp-ob0ay40y/reqd_work_group_size_check_exception-gfx1031-089502-6de473.out /tmp/lit-tmp-ob0ay40y/reqd_work_group_size_check_exception-gfx1031-e318d0-9d2a41.o Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): 0 lld 0x000055eca2c40f46 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 246 1 lld 0x000055eca2c3e824 2 libc.so.6 0x00007ff4af6b7520 3 libc.so.6 0x00007ff4af70ba7c pthread_kill + 300 4 libc.so.6 0x00007ff4af6b7476 raise + 22 5 libc.so.6 0x00007ff4af69d7f3 abort + 211 6 libc.so.6 0x00007ff4af69d71b 7 libc.so.6 0x00007ff4af6aee96 8 lld 0x000055eca3577fb9 9 lld 0x000055eca396dec1 llvm::AsmPrinter::doFinalization(llvm::Module&) + 4417 10 lld 0x000055eca5d90265 llvm::FPPassManager::doFinalization(llvm::Module&) + 117 11 lld 0x000055eca5d9c40f llvm::legacy::PassManagerImpl::run(llvm::Module&) + 1519 12 lld 0x000055eca3fcdf0a 13 lld 0x000055eca3fce629 llvm::lto::backend(llvm::lto::Config const&, std::function>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) + 761 14 lld 0x000055eca3fc1d91 llvm::lto::LTO::runRegularLTO(std::function>> (unsigned int, llvm::Twine const&)>) + 2929 15 lld 0x000055eca3fc2383 llvm::lto::LTO::run(std::function>> (unsigned int, llvm::Twine const&)>, std::function>> (unsigned int, llvm::Twine const&)>> (unsigned int, llvm::StringRef, llvm::Twine const&)>) + 739 16 lld 0x000055eca2e13fac lld::elf::BitcodeCompiler::compile() + 444 17 lld 0x000055eca2d7e42f void lld::elf::LinkerDriver::compileBitcodeFiles>(bool) + 207 18 lld 0x000055eca2d933f3 lld::elf::LinkerDriver::link(llvm::opt::InputArgList&) + 8435 19 lld 0x000055eca2d953c6 lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef) + 4854 20 lld 0x000055eca2d96c02 lld::elf::link(llvm::ArrayRef, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) + 4466 21 lld 0x000055eca2bbaed4 22 lld 0x000055eca2bbb2b6 lld_main(int, char**, llvm::ToolContext const&) + [438](https://github.com/intel/llvm/pull/9237/checks#step:8:447) 23 lld 0x000055eca2b18b83 main + 51 24 libc.so.6 0x00007ff4af69ed90 25 libc.so.6 0x00007ff4af69ee40 __libc_start_main + 128 26 lld 0x000055eca2bb8315 _start + 37 llvm-foreach: Aborted (core dumped) lld: /__w/llvm/llvm/src/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:161: virtual void llvm::AMDGPUAsmPrinter::emitEndOfAsmFile(llvm::Module&): Assertion `Success && "Malformed HSA Metadata"' failed. PLEASE submit a bug report to https://github.com/intel/llvm/issues and include the crash backtrace. Stack dump: 0. Program arguments: /__w/llvm/llvm/toolchain/bin/lld -flavor gnu -m elf64_amdgpu --no-undefined -shared -plugin-opt=-amdgpu-internalize-symbols -plugin-opt=mcpu=gfx1031 -o /tmp/lit-tmp-ob0ay40y/reqd_work_group_size_check_exception-gfx1031-089502-3524d5.out /tmp/lit-tmp-ob0ay40y/reqd_work_group_size_check_exception-gfx1031-e318d0-6dd9dd.o Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): 0 lld 0x000055757f7eef46 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 246 1 lld 0x000055757f7ec824 2 libc.so.6 0x00007f6e8ccc7520 3 libc.so.6 0x00007f6e8cd1ba7c pthread_kill + 300 4 libc.so.6 0x00007f6e8ccc7476 raise + 22 5 libc.so.6 0x00007f6e8ccad7f3 abort + 211 6 libc.so.6 0x00007f6e8ccad71b 7 libc.so.6 0x00007f6e8ccbee96 8 lld 0x0000557580125fb9 9 lld 0x000055758051bec1 llvm::AsmPrinter::doFinalization(llvm::Module&) + [441](https://github.com/intel/llvm/pull/9237/checks#step:8:450)7 10 lld 0x000055758293e265 llvm::FPPassManager::doFinalization(llvm::Module&) + 117 11 lld 0x000055758294a40f llvm::legacy::PassManagerImpl::run(llvm::Module&) + 1519 12 lld 0x0000557580b7bf0a 13 lld 0x0000557580b7c629 llvm::lto::backend(llvm::lto::Config const&, std::function>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) + 761 14 lld 0x0000557580b6fd91 llvm::lto::LTO::runRegularLTO(std::function>> (unsigned int, llvm::Twine const&)>) + 2929 15 lld 0x0000557580b70383 llvm::lto::LTO::run(std::function>> (unsigned int, llvm::Twine const&)>, std::function>> (unsigned int, llvm::Twine const&)>> (unsigned int, llvm::StringRef, llvm::Twine const&)>) + 739 16 lld 0x000055757f9c1fac lld::elf::BitcodeCompiler::compile() + [444](https://github.com/intel/llvm/pull/9237/checks#step:8:453) 17 lld 0x000055757f92c42f void lld::elf::LinkerDriver::compileBitcodeFiles>(bool) + 207 18 lld 0x000055757f9413f3 lld::elf::LinkerDriver::link(llvm::opt::InputArgList&) + 8435 19 lld 0x000055757f9433c6 lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef) + 4854 20 lld 0x000055757f944c02 lld::elf::link(llvm::ArrayRef, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) + [446](https://github.com/intel/llvm/pull/9237/checks#step:8:455)6 21 lld 0x000055757f768ed4 22 lld 0x000055757f7692b6 lld_main(int, char**, llvm::ToolContext const&) + 438 23 lld 0x000055757f6c6b83 main + 51 24 libc.so.6 0x00007f6e8ccaed90 25 libc.so.6 0x00007f6e8ccaee40 __libc_start_main + 128 26 lld 0x000055757f766315 _start + 37 llvm-foreach: Aborted (core dumped) clang++: error: amdgcn-link command failed with exit code 254 (use -v to see invocation) clang version 17.0.0 (https://github.com/intel/llvm 80dff61573c3eb59c92767805bfe818c31e36[497](https://github.com/intel/llvm/pull/9237/checks#step:8:506)) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /__w/llvm/llvm/toolchain/bin clang++: note: diagnostic msg: Error generating preprocessed source(s).error: command failed with exit status: 1