CHIP-SPV / chipStar

chipStar is a tool for compiling and running HIP/CUDA on SPIR-V via OpenCL or Level Zero APIs.
Other
225 stars 33 forks source link

Resurrect __bitinsert_u32, implement __bitinsert_u64 for release 1.1 #703

Closed linehill closed 11 months ago

linehill commented 11 months ago

https://github.com/CHIP-SPV/chipStar/pull/702 cherry-picked for the 1.1 release

Resolves #701.

pjaaskel commented 11 months ago

Is those fails bot issues, out of disk? Clang crashes there?

pvelesko commented 11 months ago

Is those fails bot issues, out of disk? Clang crashes there?

What do you mean?

pvelesko commented 11 months ago

rebasing on Release-1.1

pvelesko commented 11 months ago

@pjaaskel Did you mean this compiler crash?

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: /opt/install/llvm/15.0/bin/clang++ -DCHIP_EXPORTS -DHAVE_LEVEL0 -DHAVE_OPENCL -DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE -D__HIP_PLATFORM_SPIRV__= -I/opt/actions-runner/_work/chipStar/chipStar/bitcode -I/opt/actions-runner/_work/chipStar/chipStar/HIP/include -I/opt/actions-runner/_work/chipStar/chipStar/include -I/opt/actions-runner/_work/chipStar/chipStar/include/cuspv -I/opt/actions-runner/_work/chipStar/chipStar/build/include -I/opt/actions-runner/_work/chipStar/chipStar/src -I/opt/actions-runner/_work/chipStar/chipStar/CHIP -I/opt/actions-runner/_work/chipStar/chipStar/PUBLIC -I/usr/local/lib/../include/level_zero -Wno-duplicate-decl-specifier -Wno-tautological-constant-compare -Wno-c++20-extensions -Wno-unused-result -Wno-delete-abstract-non-virtual-dtor -Wno-deprecated-declarations -Wunused-command-line-argument -g -fPIC -Wno-format-extra-args -mf16c -Wall -gdwarf-4 -O1 -std=c++17 -MD -MT CMakeFiles/CHIP.dir/src/backend/Level0/CHIPBackendLevel0.cc.o -MF CMakeFiles/CHIP.dir/src/backend/Level0/CHIPBackendLevel0.cc.o.d -o CMakeFiles/CHIP.dir/src/backend/Level0/CHIPBackendLevel0.cc.o -c /opt/actions-runner/_work/chipStar/chipStar/src/backend/Level0/CHIPBackendLevel0.cc
1.  <eof> parser at end of file
2.  Code generation
3.  Running pass 'Function Pass Manager' on module '/opt/actions-runner/_work/chipStar/chipStar/src/backend/Level0/CHIPBackendLevel0.cc'.
4.  Running pass 'Debug Variable Analysis' on function '@_ZN6spdlog6logger3logIJmmPKvEEEvNS_10source_locENS_5level10level_enumEPKcDpRKT_'
 #0 0x00005[606](https://github.com/CHIP-SPV/chipStar/actions/runs/7004165847/job/19082314965#step:3:607)fcfa4a48 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #1 0x00005606fcfa25bc llvm::sys::CleanupOnSignal(unsigned long) (/opt/install/llvm/15.0/bin/clang+++0x20225bc)
 #2 0x00005606fcee96c8 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007fac40094520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00005606fc550a39 llvm::LexicalScopes::getOrCreateAbstractScope(llvm::DILocalScope const*) (/opt/install/llvm/15.0/bin/clang+++0x15d0a39)
 #5 0x00005606fc5517c3 llvm::LexicalScopes::getOrCreateInlinedScope(llvm::DILocalScope const*, llvm::DILocation const*) (/opt/install/llvm/15.0/bin/clang+++0x15d17c3)
 #6 0x00005606fc55290a llvm::LexicalScopes::extractLexicalScopes(llvm::SmallVectorImpl<std::pair<llvm::MachineInstr const*, llvm::MachineInstr const*>>&, llvm::DenseMap<llvm::MachineInstr const*, llvm::LexicalScope*, llvm::DenseMapInfo<llvm::MachineInstr const*, void>, llvm::detail::DenseMapPair<llvm::MachineInstr const*, llvm::LexicalScope*>>&) (/opt/install/llvm/15.0/bin/clang+++0x15d290a)
 #7 0x00005606fc5537f4 llvm::LexicalScopes::initialize(llvm::MachineFunction const&) (/opt/install/llvm/15.0/bin/clang+++0x15d37f4)
 #8 0x00005606fc564388 (anonymous namespace)::LDVImpl::runOnMachineFunction(llvm::MachineFunction&, bool) LiveDebugVariables.cpp:0:0
 #9 0x00005606fc31b3a3 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#10 0x00005606fc81be80 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/install/llvm/15.0/bin/clang+++0x189be80)
#11 0x00005606fc81bfb4 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/install/llvm/15.0/bin/clang+++0x189bfb4)
#12 0x00005606fc81c94d llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/install/llvm/15.0/bin/clang+++0x189c94d)
#13 0x00005606fd3163e9 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) (/opt/install/llvm/15.0/bin/clang+++0x23963e9)
#14 0x00005606fe0ac59e clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/install/llvm/15.0/bin/clang+++0x312c59e)
#15 0x00005606fec7c6e9 clang::ParseAST(clang::Sema&, bool, bool) (/opt/install/llvm/15.0/bin/clang+++0x3cfc6e9)
#16 0x00005606fda49ca9 clang::FrontendAction::Execute() (/opt/install/llvm/15.0/bin/clang+++0x2ac9ca9)
#17 0x00005606fd9dafb1 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/install/llvm/15.0/bin/clang+++0x2a5afb1)
#18 0x00005606fdb0338b clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/install/llvm/15.0/bin/clang+++0x2b8338b)
#19 0x00005606fbbe07fd cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/install/llvm/15.0/bin/clang+++0xc[607](https://github.com/CHIP-SPV/chipStar/actions/runs/7004165847/job/19082314965#step:3:608)fd)
#20 0x00005606fbbda033 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#21 0x00005606fd83faa9 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#22 0x00005606fcee97d7 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/install/llvm/15.0/bin/clang+++0x1f697d7)
#23 0x00005606fd83fe4c clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#24 0x00005606fd80cda9 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/install/llvm/15.0/bin/clang+++0x288cda9)
#25 0x00005606fd80d80d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/install/llvm/15.0/bin/clang+++0x288d80d)
#26 0x00005606fd81d16c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/install/llvm/15.0/bin/clang+++0x289d16c)
#27 0x00005606fbbde6d7 clang_main(int, char**) (/opt/install/llvm/15.0/bin/clang+++0xc5e6d7)
#28 0x00007fac4007bd90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#29 0x00007fac4007be40 call_init ./csu/../csu/libc-start.c:128:20
#30 0x00007fac4007be40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#31 0x00005606fbbd9765 _start (/opt/install/llvm/15.0/bin/clang+++0xc59765)
clang-15: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 15.0.6 (git@github.com:CHIP-SPV/llvm-project.git 31233417513505db770574f3857f090cdcea3828)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/install/llvm/15.0/bin
clang-15: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-15: note: diagnostic msg: /tmp/CHIPBackendLevel0-d5ff1a.cpp
clang-15: note: diagnostic msg: /tmp/CHIPBackendLevel0-d5ff1a.sh
clang-15: note: diagnostic msg:
pjaaskel commented 11 months ago

Maybe. I was just wondering what caused the CI fails here.

pjaaskel commented 11 months ago

@linehill is this reproducible locally?

linehill commented 11 months ago

@linehill is this reproducible locally?

Haven't seen crashes on my end. The crashes seen here and other PRs appears to be random.

pvelesko commented 11 months ago

@linehill @pjaaskel started recently and appear to be random.

pjaaskel commented 11 months ago

You mean that even the same clang++ cmdline crashes only randomly? Only with LLVM 15? Single threaded tests? It's difficult to fix issues others can repro.