-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
Assertion fail in VerifySDNode #121601
Comments
@llvm/issue-subscribers-backend-amdgpu Author: None (shivadbhavsar)
Full Dump:
```
clang-19: /long_pathname_so_that_rpms_can_package_the_debug_info/src/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1143: void VerifySDNode(llvm::SDNode*, const llvm::TargetLowering*): Assertion `(Op.getValueType() == EltVT || (EltVT.isInteger() && Op.getValueType().isInteger() && EltVT.bitsLE(Op.getValueType()))) && "Wrong operand type!"' failed.
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/rocm-6.4.0/lib/llvm/bin/clang-19 -cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-linux-gnu -Werror=atomic-alignment -emit-obj -disable-free -clear-ast-before-backend -main-file-name main.cpp -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=none -fno-rounding-math -mconstructor-aliases -aux-target-cpu x86-64 -fcuda-is-device -mllvm -amdgpu-internalize-symbols -fcuda-allow-variadic-functions -fvisibility=hidden -fapply-global-visibility-to-externs -mlink-builtin-bitcode /opt/rocm-6.4.0/lib/llvm/lib/clang/19/lib/amdgcn/bitcode/hip.bc -mlink-builtin-bitcode /opt/rocm-6.4.0/lib/llvm/lib/clang/19/lib/amdgcn/bitcode/ocml.bc -mlink-builtin-bitcode /opt/rocm-6.4.0/lib/llvm/lib/clang/19/lib/amdgcn/bitcode/ockl.bc -mlink-builtin-bitcode /opt/rocm-6.4.0/lib/llvm/lib/clang/19/lib/amdgcn/bitcode/oclc_daz_opt_off.bc -mlink-builtin-bitcode /opt/rocm-6.4.0/lib/llvm/lib/clang/19/lib/amdgcn/bitcode/oclc_unsafe_math_off.bc -mlink-builtin-bitcode /opt/rocm-6.4.0/lib/llvm/lib/clang/19/lib/amdgcn/bitcode/oclc_finite_only_off.bc -mlink-builtin-bitcode /opt/rocm-6.4.0/lib/llvm/lib/clang/19/lib/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc -mlink-builtin-bitcode /opt/rocm-6.4.0/lib/llvm/lib/clang/19/lib/amdgcn/bitcode/oclc_wavefrontsize64_on.bc -mlink-builtin-bitcode /opt/rocm-6.4.0/lib/llvm/lib/clang/19/lib/amdgcn/bitcode/oclc_isa_version_942.bc -mlink-builtin-bitcode /opt/rocm-6.4.0/lib/llvm/lib/clang/19/lib/amdgcn/bitcode/oclc_abi_version_500.bc -target-cpu gfx942 -target-feature +sramecc -target-feature -xnack -debugger-tuning=gdb -fdebug-compilation-dir=/tmp/migraphx-compile-1f8626-7f5ed2beef80-13ef2d5f42c226-YAczaLXLM2FRe5pP -resource-dir /opt/rocm-6.4.0/lib/llvm/lib/clang/19 -internal-isystem /opt/rocm-6.4.0/lib/llvm/lib/clang/19/include/cuda_wrappers -idirafter /opt/rocm-6.4.0/lib/llvm/bin/../../../include -include __clang_hip_runtime_wrapper.h -isystem /opt/rocm/include -isystem /opt/rocm/include -D MIGRAPHX_NGLOBAL=7077888 -D MIGRAPHX_NLOCAL=64 -D MIGRAPHX_WAVEFRONTSIZE=64 -D __HIP_PLATFORM_AMD__=1 -D USE_PROF_API=1 -I . -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/x86_64-linux-gnu/c++/11 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/backward -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/x86_64-linux-gnu/c++/11 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/backward -internal-isystem /opt/rocm-6.4.0/lib/llvm/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -internal-isystem /opt/rocm-6.4.0/lib/llvm/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Wno-float-equal -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-conversion -Wno-double-promotion -Wno-exit-time-destructors -Wno-extra-semi -Wno-extra-semi-stmt -Wno-float-conversion -Wno-gnu-anonymous-struct -Wno-gnu-zero-variadic-macro-arguments -Wno-missing-prototypes -Wno-nested-anon-types -Wno-padded -Wno-shorten-64-to-32 -Wno-sign-conversion -Wno-sign-compare -Wno-unused-command-line-argument -Wno-weak-vtables -Wno-c99-extensions -Wno-unsafe-buffer-usage -Werror -Wno-unused-command-line-argument -Wno-cuda-compat --std=c++17 -fdeprecated-macro -fno-autolink -ferror-limit 19 -ftemplate-backtrace-limit=0 -fhip-new-launch-api -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fcolor-diagnostics -vectorize-loops -vectorize-slp -cuid=2474830f93fc8c14 -fcuda-allow-variadic-functions -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/main-gfx942:sramecc+:xnack--528621.o -x hip main.cpp
1. <eof> parser at end of file
2. Code generation
3. Running pass 'CallGraph Pass Manager' on module 'main.cpp'.
4. Running pass 'AMDGPU DAG->DAG Pattern Instruction Selection' on function '@convert_pow_mul_reduce_sum_add_rsqrt_convert_mul_mul_convert_kernel'
#0 0x0000559a83d9b0e0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (.localalias) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x2a570e0)
#1 0x0000559a83d9850f llvm::sys::RunSignalHandlers() (.localalias) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x2a5450f)
#2 0x0000559a83d98665 SignalHandler(int) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x2a54665)
#3 0x00007f40f8237520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x00007f40f828b9fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#5 0x00007f40f8237476 raise (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#6 0x00007f40f821d7f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#7 0x00007f40f821d71b _dl_exception_create (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#8 0x00007f40f822ee96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#9 0x0000559a84fa778f llvm::SelectionDAG::InsertNode(llvm::SDNode*) (.localalias) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x3c6378f)
#10 0x0000559a84fee629 llvm::SelectionDAG::getNode(unsigned int, llvm::SDLoc const&, llvm::EVT, llvm::ArrayRef<llvm::SDValue>, llvm::SDNodeFlags) (.localalias) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x3caa629)
#11 0x0000559a84e35bcb combineConcatVectorOfScalars(llvm::SDNode*, llvm::SelectionDAG&) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x3af1bcb)
#12 0x0000559a84e72e3d (anonymous namespace)::DAGCombiner::visitCONCAT_VECTORS(llvm::SDNode*) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x3b2ee3d)
#13 0x0000559a84ee7e04 (anonymous namespace)::DAGCombiner::combine(llvm::SDNode*) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x3ba3e04)
#14 0x0000559a84ee95b0 (anonymous namespace)::DAGCombiner::Run(llvm::CombineLevel) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x3ba55b0)
#15 0x0000559a84eebdbb llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults*, llvm::CodeGenOptLevel) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x3ba7dbb)
#16 0x0000559a8502de2a llvm::SelectionDAGISel::CodeGenAndEmitDAG() (.localalias) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x3ce9e2a)
#17 0x0000559a85031eec llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (.localalias) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x3cedeec)
#18 0x0000559a850335ef llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.localalias) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x3cef5ef)
#19 0x0000559a850245f9 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (.localalias) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x3ce05f9)
#20 0x0000559a8307ad57 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x1d36d57)
#21 0x0000559a836e43a6 llvm::FPPassManager::runOnFunction(llvm::Function&) (.localalias) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x23a03a6)
#22 0x0000559a82c69cfa (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x1925cfa)
#23 0x0000559a836e4f55 llvm::legacy::PassManagerImpl::run(llvm::Module&) (.localalias) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x23a0f55)
#24 0x0000559a8402cdd9 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*) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x2ce8dd9)
#25 0x0000559a846a0c24 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (.localalias) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x335cc24)
#26 0x0000559a8631c25c clang::ParseAST(clang::Sema&, bool, bool) (.localalias) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x4fd825c)
#27 0x0000559a8496aa39 clang::FrontendAction::Execute() (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x3626a39)
#28 0x0000559a848e8ad5 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (.localalias) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x35a4ad5)
#29 0x0000559a84a42158 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0x36fe158)
#30 0x0000559a82164de7 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0xe20de7)
#31 0x0000559a8215d21a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0xe1921a)
#32 0x0000559a82160725 clang_main(int, char**, llvm::ToolContext const&) (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0xe1c725)
#33 0x0000559a8208d0fb main (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0xd490fb)
#34 0x00007f40f821ed90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#35 0x00007f40f821ee40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#36 0x0000559a8215c945 _start (/opt/rocm-6.4.0/lib/llvm/bin/clang-19+0xe18945)
clang++: error: unable to execute command: Aborted (core dumped)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
AMD clang version 19.0.0git (ssh://gerritgit/lightning/ec/llvm-project 24481 4080cbd)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/rocm-6.4.0/lib/llvm/bin
Build config: +assertions
Configuration file: /opt/rocm-6.4.0/lib/llvm/bin/clang++.cfg
clang++: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
|
Reduced issue121601.ll.zip |
This is caused by using getFloatingPointVT which just assumes 16-bit should be f16, and then directly uses it with the bf16 value |
Full Dump:
Repro files:
issue 3728.zip
Affects ROCm/AMDMIGraphX#3728
The text was updated successfully, but these errors were encountered: