Skip to content
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

OpenCL (CLC++2021) compilation to SPIR-V fails #68305

Open
davidrohr opened this issue Oct 5, 2023 · 7 comments
Open

OpenCL (CLC++2021) compilation to SPIR-V fails #68305

davidrohr opened this issue Oct 5, 2023 · 7 comments
Assignees
Labels
backend:SPIR-V crash Prefer [crash-on-valid] or [crash-on-invalid] SPIR-V SPIR-V language support

Comments

@davidrohr
Copy link

Compilation with clang 17.0.2 (on Gentoo Linux) fails with the below error message. I was using clang 15 before, which didn't fail. I also tried clang 16 now, which failed with the same error, I didn't try other versions.

I am attaching a tarball with my .cl file, and with the 2 files in /tmp that clang asked me to attach to the bug report:
bugreport.tar.gz

Command to reproduce:

clang-17 -O0 --target=spirv64 -ferror-limit=1000 -Dcl_clang_storage_class_specifiers -Wno-invalid-constexpr -Wno-unused-command-line-argument -cl-std=CLC++2021 -Xclang -fdenormal-fp-math-f32=ieee -cl-mad-enable -cl-no-signed-zeros -c foo.cl -o foo.spirv

Error message:

llvm-spirv: /usr/lib/llvm/17/include/llvm/ADT/SmallVector.h:294: T& llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::operator[](size_type) [with T = llvm::Type*; <template-parameter-1-2> = void; reference = llvm::Type*&; size_type = long unsigned int]: Assertion `idx < size()' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /usr/lib/llvm/17/bin/llvm-spirv /tmp/foo-21cdb2.bc -o /home/qon/foo.spirv
 #0 0x00007f161a086fae llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm/17/lib64/libLLVM-17.so+0xc86fae)
 #1 0x00007f161a084c44 llvm::sys::RunSignalHandlers() (/usr/lib/llvm/17/lib64/libLLVM-17.so+0xc84c44)
 #2 0x00007f161a084db6 (/usr/lib/llvm/17/lib64/libLLVM-17.so+0xc84db6)
 #3 0x00007f1618e641b0 (/lib64/libc.so.6+0x391b0)
 #4 0x00007f1618eb208c (/lib64/libc.so.6+0x8708c)
 #5 0x00007f1618e64112 gsignal (/lib64/libc.so.6+0x39112)
 #6 0x00007f1618e4d4f2 abort (/lib64/libc.so.6+0x224f2)
 #7 0x00007f1618e4d415 (/lib64/libc.so.6+0x22415)
 #8 0x00007f1618e5cd32 (/lib64/libc.so.6+0x31d32)
 #9 0x00007f16213da2bf SPIRV::BuiltinCallMutator::doConversion() (/usr/lib/llvm/17/lib64/libLLVMSPIRVLib.so.17+0x1da2bf)
#10 0x00007f16213a03ef (/usr/lib/llvm/17/lib64/libLLVMSPIRVLib.so.17+0x1a03ef)
#11 0x00007f16213a90fb SPIRV::OCLToSPIRVBase::transBuiltin(llvm::CallInst*, OCLUtil::OCLBuiltinTransInfo&) (/usr/lib/llvm/17/lib64/libLLVMSPIRVLib.so.17+0x1a90fb)
#12 0x00007f16213aa280 SPIRV::OCLToSPIRVBase::visitCallBuiltinSimple(llvm::CallInst*, llvm::StringRef, llvm::StringRef) (/usr/lib/llvm/17/lib64/libLLVMSPIRVLib.so.17+0x1aa280)
#13 0x00007f16213b189c SPIRV::OCLToSPIRVBase::visitCallInst(llvm::CallInst&) (/usr/lib/llvm/17/lib64/libLLVMSPIRVLib.so.17+0x1b189c)
#14 0x00007f16213a0841 SPIRV::OCLToSPIRVBase::runOCLToSPIRV(llvm::Module&) (/usr/lib/llvm/17/lib64/libLLVMSPIRVLib.so.17+0x1a0841)
#15 0x00007f16213a0b6e SPIRV::OCLToSPIRVPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/lib/llvm/17/lib64/libLLVMSPIRVLib.so.17+0x1a0b6e)
#16 0x00007f16214b021d (/usr/lib/llvm/17/lib64/libLLVMSPIRVLib.so.17+0x2b021d)
#17 0x00007f16214f4f27 (/usr/lib/llvm/17/lib64/libLLVMSPIRVLib.so.17+0x2f4f27)
#18 0x000055b379753efd (/usr/lib/llvm/17/bin/llvm-spirv+0x13efd)
#19 0x000055b37974d0c2 (/usr/lib/llvm/17/bin/llvm-spirv+0xd0c2)
#20 0x00007f1618e4eb8a (/lib64/libc.so.6+0x23b8a)
#21 0x00007f1618e4ec45 __libc_start_main (/lib64/libc.so.6+0x23c45)
#22 0x000055b37974d471 (/usr/lib/llvm/17/bin/llvm-spirv+0xd471)
clang-17: error: unable to execute command: Aborted
clang-17: error: llvm-spirv command failed due to signal (use -v to see invocation)
clang version 17.0.2
Target: spirv64
Thread model: posix
InstalledDir: /usr/lib/llvm/17/bin
clang-17: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-17: note: diagnostic msg: /tmp/foo-f70c1d.cl
clang-17: note: diagnostic msg: /tmp/foo-f70c1d.sh
clang-17: note: diagnostic msg: 

********************
@Endilll Endilll added crash Prefer [crash-on-valid] or [crash-on-invalid] backend:SPIR-V and removed new issue labels Oct 5, 2023
@michalpaszkowski michalpaszkowski added SPIR-V SPIR-V language support and removed backend:SPIR-V labels Oct 5, 2023
@michalpaszkowski
Copy link
Member

Hi @davidrohr! The error does not appear in the SPIR-V backend, but rather the Khronos SPIR-V LLVM Translator which is installed in your system and depends on LLVM.

@davidrohr
Copy link
Author

ok, clang told me to file a bug report, which I did here since it seemed natural.
If you want me to file the bug report again at https://github.com/KhronosGroup/SPIRV-LLVM-Translator, I can do so and close this one.

@davidrohr
Copy link
Author

I just tried again the same with -fintegrated-objemitter, which should force using the clang-internal SPIR-V backend if I understand correctly.

Also that fails with an error.
The message is below, and the reproducer files are attached.

testcase.tar.gz

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /usr/lib/llvm/17/bin/clang -O0 --target=spirv64 -fintegrated-objemitter -ferror-limit=1000 -Dcl_clang_storage_class_specifiers -Wno-invalid-constexpr -Wno-unused-command-line-argument -cl-std=CLC++2021 -Xclang -fdenormal-fp-math-f32=ieee -cl-mad-enable -cl-no-signed-zeros -DGPUCA_BUILD_QA -DWITH_OPENMP -DGPUCA_STANDALONE -DNDEBUG -DGPUCA_TPC_GEOMETRY_O2 -DGPUCA_HAVE_O2HEADERS -DGPUCA_NO_ITS_TRAITS -DFMT_SHARED -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../Common -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../Utils -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../TPCFastTransformation -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/Debug -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/Definitions -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/DataTypes -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/Base -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/Base/opencl-common -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/dEdx -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/TPCConvert -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/Global -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/HLTHeaders -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/Merger -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/Refit -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/qa -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/SliceTracker -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/DataCompression -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/TRDTracking -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/TPCClusterFinder -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/ITS -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../GPUTracking/Interface -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Common/Field/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Common/Constants/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Common/MathUtils/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Common/Utils/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../DataFormats/common/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../DataFormats/Detectors/Common/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../DataFormats/Detectors/ITSMFT/common/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../DataFormats/Detectors/ITSMFT/ITS/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../DataFormats/Detectors/TOF/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../DataFormats/Detectors/TPC/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../DataFormats/Detectors/TRD/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../DataFormats/Headers/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../DataFormats/MemoryResources/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../DataFormats/Reconstruction/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../DataFormats/Reconstruction/src -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../DataFormats/simulation/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Detectors/Base/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Detectors/Base/src -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Detectors/ITSMFT/common/base/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Detectors/ITSMFT/ITS/base/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Detectors/ITSMFT/ITS/tracking/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Detectors/ITSMFT/ITS/tracking/cuda/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Detectors/ITSMFT/ITS/tracking/cuda/src -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Detectors/ITSMFT/ITS/tracking/hip/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Detectors/ITSMFT/ITS/tracking/hip/src -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Detectors/Raw/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Detectors/TOF/base/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Detectors/TPC/base/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Detectors/TRD/base/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Detectors/TRD/base/src -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../../../Framework/Foundation/3rdparty/include -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/../..//GPUTracking/display/3rdparty -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/Detectors/TRD/base/src -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/Detectors/Base/src -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/DataFormats/Reconstruction/src -I/home/qon/alice/O2/GPU/GPUTracking/Standalone/Detectors/ITSMFT/ITS/tracking/cuda/include -DGPUCA_GPULIBRARY=OCL2 -D__OPENCLCPP__ -o /home/qon/standalone/build/GPU/GPUTracking/Base/opencl2/GPUReconstructionOCL2Code.spirv -c /home/qon/alice/O2/GPU/GPUTracking/Standalone/..//Base/opencl-common/GPUReconstructionOCL.cl
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '/home/qon/alice/O2/GPU/GPUTracking/Standalone/..//Base/opencl-common/GPUReconstructionOCL.cl'.
4.      Running pass 'InstructionSelect' on function '@"_ZNU3AS42o23gpu18GPUCommonAlgorithm18UnguardedPartitionIPPU3AS4NS0_18GPUTPCGMSliceTrackES5_ZNU3AS4S0_14GPUTPCGMMerger19CollectMergedTracksEiiiiE3$_0EET_SA_SA_T0_T1_"'
 #0 0x00007f959a686fae llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0xc86fae)
 #1 0x00007f959a684c44 llvm::sys::RunSignalHandlers() (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0xc84c44)
 #2 0x00007f959a5b74a8 (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0xbb74a8)
 #3 0x00007f95994641b0 (/lib64/libc.so.6+0x391b0)
 #4 0x00007f959d009463 (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x3609463)
 #5 0x00007f959d00ad54 (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x360ad54)
 #6 0x00007f959b17ec7e llvm::InstructionSelect::runOnMachineFunction(llvm::MachineFunction&) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x177ec7e)
 #7 0x00007f959aa9fd11 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x109fd11)
 #8 0x00007f959a7db6ed llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0xddb6ed)
 #9 0x00007f959a7db983 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0xddb983)
#10 0x00007f959a7dc024 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0xddc024)
#11 0x00007f95a3762548 (/usr/lib/llvm/17/bin/../lib64/libclang-cpp.so.17+0x1f62548)
#12 0x00007f95a3762902 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) (/usr/lib/llvm/17/bin/../lib64/libclang-cpp.so.17+0x1f62902)
#13 0x00007f95a3bfe04f (/usr/lib/llvm/17/bin/../lib64/libclang-cpp.so.17+0x23fe04f)
#14 0x00007f95a24167d6 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/llvm/17/bin/../lib64/libclang-cpp.so.17+0xc167d6)
#15 0x00007f95a45b9cd1 clang::FrontendAction::Execute() (/usr/lib/llvm/17/bin/../lib64/libclang-cpp.so.17+0x2db9cd1)
#16 0x00007f95a453bfb3 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/llvm/17/bin/../lib64/libclang-cpp.so.17+0x2d3bfb3)
#17 0x00007f95a464ab27 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/llvm/17/bin/../lib64/libclang-cpp.so.17+0x2e4ab27)
#18 0x0000557d1e158483 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/lib/llvm/17/bin/clang+0x17483)
#19 0x0000557d1e153482 (/usr/lib/llvm/17/bin/clang+0x12482)
#20 0x00007f95a4160499 (/usr/lib/llvm/17/bin/../lib64/libclang-cpp.so.17+0x2960499)
#21 0x00007f959a5b7593 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0xbb7593)
#22 0x00007f95a416316d clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/usr/lib/llvm/17/bin/../lib64/libclang-cpp.so.17+0x296316d)
#23 0x00007f95a4124f6c clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/lib/llvm/17/bin/../lib64/libclang-cpp.so.17+0x2924f6c)
#24 0x00007f95a4125aad clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/usr/lib/llvm/17/bin/../lib64/libclang-cpp.so.17+0x2925aad)
#25 0x00007f95a4136e0c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/usr/lib/llvm/17/bin/../lib64/libclang-cpp.so.17+0x2936e0c)
#26 0x0000557d1e154df9 clang_main(int, char**, llvm::ToolContext const&) (/usr/lib/llvm/17/bin/clang+0x13df9)
#27 0x0000557d1e14f8c1 main (/usr/lib/llvm/17/bin/clang+0xe8c1)
#28 0x00007f959944eb8a (/lib64/libc.so.6+0x23b8a)
#29 0x00007f959944ec45 __libc_start_main (/lib64/libc.so.6+0x23c45)
#30 0x0000557d1e14f8f1 _start (/usr/lib/llvm/17/bin/clang+0xe8f1)
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 17.0.2
Target: spirv64
Thread model: posix
InstalledDir: /usr/lib/llvm/17/bin
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/GPUReconstructionOCL-746d6e.cl
clang: note: diagnostic msg: /tmp/GPUReconstructionOCL-746d6e.sh
clang: note: diagnostic msg: 

********************

@davidrohr
Copy link
Author

For reference, I just tried the same with clang 18.1, and it fails in the same way

@davidrohr
Copy link
Author

For reference, the related problem I had with the spirv-llvm-translater (KhronosGroup/SPIRV-LLVM-Translator#2193) is now worked around / fixed.

I can compile the code to SPIR-V using clang 18.1.4 with #90048 and using the translator. While the same code still fails using the internal spirv backend with -fintegrated-objemitter.
I am attaching my latest testcase.
testcase.tar.gz

@davidrohr
Copy link
Author

Any progress on this? There was no activity in the last 7 months.

@davidrohr
Copy link
Author

For reference, I retried with LLVM 19, and it is still failing with very similar error message. I am attaching the testcase and the console output.

testcase.tar.gz

1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '/home/qon/alice/sw/SOURCES/O2/dev/0/GPU/GPUTracking/Base/opencl-common/GPUReconstructionOCL.cl'.
4.      Running pass 'InstructionSelect' on function '@_ZNU3AS42o23gpu18GPUCommonAlgorithm18UnguardedPartitionIPU3AS4jjZNU3AS4S0_28GPUTPCSectorDebugSortKernels6ThreadILi0EEEviiiiRU3AS4NS0_17GPUKernelTemplate15GPUSharedMemoryERU3AS4NS0_13GPUTPCTrackerEEUlRU3AS4KjSF_E_EET_SH_SH_T0_T1_'
 #0 0x00007f873bb391b3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm/19/bin/../lib64/libLLVM.so.19.1+0xb391b3)
 #1 0x00007f873bb36784 llvm::sys::RunSignalHandlers() (/usr/lib/llvm/19/bin/../lib64/libLLVM.so.19.1+0xb36784)
 #2 0x00007f873ba52586 llvm::CrashRecoveryContext::HandleExit(int) (/usr/lib/llvm/19/bin/../lib64/libLLVM.so.19.1+0xa52586)
 #3 0x00007f873bb30772 llvm::sys::Process::Exit(int, bool) (/usr/lib/llvm/19/bin/../lib64/libLLVM.so.19.1+0xb30772)
 #4 0x0000558c4da70b79 (/usr/lib/llvm/19/bin/clang+0x15b79)
 #5 0x00007f873ba65ea1 llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/lib/llvm/19/bin/../lib64/libLLVM.so.19.1+0xa65ea1)
 #6 0x00007f873c82f616 (/usr/lib/llvm/19/bin/../lib64/libLLVM.so.19.1+0x182f616)
 #7 0x00007f873c830f57 llvm::reportGISelFailure(llvm::MachineFunction&, llvm::TargetPassConfig const&, llvm::MachineOptimizationRemarkEmitter&, char const*, llvm::StringRef, llvm::MachineInstr const&) (/usr/lib/llvm/19/bin/../lib64/libLLVM.so.19.1+0x1830f57)
 #8 0x00007f873c7b847b llvm::InstructionSelect::runOnMachineFunction(llvm::MachineFunction&) (/usr/lib/llvm/19/bin/../lib64/libLLVM.so.19.1+0x17b847b)
 #9 0x00007f873bfe6878 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/lib/llvm/19/bin/../lib64/libLLVM.so.19.1+0xfe6878)
#10 0x00007f873bcc3b74 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/lib/llvm/19/bin/../lib64/libLLVM.so.19.1+0xcc3b74)
#11 0x00007f873bcc3e43 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/lib/llvm/19/bin/../lib64/libLLVM.so.19.1+0xcc3e43)
#12 0x00007f873bcc45a2 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/llvm/19/bin/../lib64/libLLVM.so.19.1+0xcc45a2)
#13 0x00007f87455c8eb2 (/usr/lib/llvm/19/bin/../lib64/libclang-cpp.so.19.1+0x21c8eb2)
#14 0x00007f87455c9886 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/usr/lib/llvm/19/bin/../lib64/libclang-cpp.so.19.1+0x21c9886)
#15 0x00007f8745af1149 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/lib/llvm/19/bin/../lib64/libclang-cpp.so.19.1+0x26f1149)
#16 0x00007f8743da558d clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/llvm/19/bin/../lib64/libclang-cpp.so.19.1+0x9a558d)
#17 0x00007f874662f759 clang::FrontendAction::Execute() (/usr/lib/llvm/19/bin/../lib64/libclang-cpp.so.19.1+0x322f759)
#18 0x00007f874659808e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/llvm/19/bin/../lib64/libclang-cpp.so.19.1+0x319808e)
#19 0x00007f87466d4d37 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/llvm/19/bin/../lib64/libclang-cpp.so.19.1+0x32d4d37)
#20 0x0000558c4da72fe7 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/lib/llvm/19/bin/clang+0x17fe7)
#21 0x0000558c4da6d0e6 (/usr/lib/llvm/19/bin/clang+0x120e6)
#22 0x00007f8746144b5d (/usr/lib/llvm/19/bin/../lib64/libclang-cpp.so.19.1+0x2d44b5d)
#23 0x00007f873ba52487 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/lib/llvm/19/bin/../lib64/libLLVM.so.19.1+0xa52487)
#24 0x00007f8746147a4d clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/usr/lib/llvm/19/bin/../lib64/libclang-cpp.so.19.1+0x2d47a4d)
#25 0x00007f8746101883 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/lib/llvm/19/bin/../lib64/libclang-cpp.so.19.1+0x2d01883)
#26 0x00007f874610235e clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/usr/lib/llvm/19/bin/../lib64/libclang-cpp.so.19.1+0x2d0235e)
#27 0x00007f87461160fc clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/usr/lib/llvm/19/bin/../lib64/libclang-cpp.so.19.1+0x2d160fc)
#28 0x0000558c4da6e7a3 clang_main(int, char**, llvm::ToolContext const&) (/usr/lib/llvm/19/bin/clang+0x137a3)
#29 0x0000558c4da6b1a7 main (/usr/lib/llvm/19/bin/clang+0x101a7)
#30 0x00007f873a82634e (/usr/lib64/libc.so.6+0x2634e)
#31 0x00007f873a826409 __libc_start_main (/usr/lib64/libc.so.6+0x26409)
#32 0x0000558c4da6b1f5 _start (/usr/lib/llvm/19/bin/clang+0x101f5)
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 19.1.3
Target: spirv64
Thread model: posix
InstalledDir: /usr/lib/llvm/19/bin
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/GPUReconstructionOCL-dd51ff.cl
clang: note: diagnostic msg: /tmp/GPUReconstructionOCL-dd51ff.sh
clang: note: diagnostic msg: 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:SPIR-V crash Prefer [crash-on-valid] or [crash-on-invalid] SPIR-V SPIR-V language support
Projects
None yet
Development

No branches or pull requests

3 participants