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

[SYCL][CUDA] pass 'Add implicit SYCL global offset': Assertion `Val && "isa<> used on a null pointer"' failed. #3271

Closed
rolandschulz opened this issue Feb 28, 2021 · 0 comments · Fixed by #3272
Labels
bug Something isn't working cuda CUDA back-end

Comments

@rolandschulz
Copy link
Contributor

rolandschulz commented Feb 28, 2021

Trying to build GROMACS SYCL fails during linking:

clang-13: /nfs/pdx/home/schulzro/sycl/llvm/include/llvm/Support/Casting.h:90: static bool llvm::isa_impl_cl<To, From*>::doit(const From*) [with To = llvm::ConstantAsMetadata; From = llvm::Metadata]: Assertion `Val && "isa<> used on a null pointer"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/clang-13 -cc1 -triple nvptx64-nvidia-cuda-sycldevice -fsycl -fsycl-is-device -fdeclare-spirv-builtins -aux-triple x86_64-unknown-linux-gnu -Wno-sycl-strict -sycl-std=2020 -S -disable-free -main-file-name gmx.cpp.o -mrelocation-model static -mframe-pointer=all -fno-rounding-math -fno-verbose-asm -no-integrated-as -aux-target-cpu x86-64 -internal-isystem /nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/../include/sycl -mlink-builtin-bitcode /nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/lib/clang/13.0.0/../../clc/libspirv-nvptx64--nvidiacl.bc -mlink-builtin-bitcode /usr/local/cuda/nvvm/libdevice/libdevice.10.bc -target-feature +ptx70 -target-sdk-version=11.0 -target-cpu sm_50 -fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir /nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/lib/clang/13.0.0 -O3 -fno-dwarf-directory-asm -fdebug-compilation-dir /nfs/pdx/home/schulzro/gromacs.sycl/clang.cuda_be -ferror-limit 19 -pthread -fgnuc-version=4.2.1 -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /tmp/gmx-c516da.s -x ir /tmp/gmx-637e0f.bc
1.      Code generation
2.      Running pass 'Add implicit SYCL global offset' on module '/tmp/gmx-637e0f.bc'.
 #0 0x0000000001e7230d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/clang-13+0x1e7230d)
 #1 0x0000000001e70274 llvm::sys::RunSignalHandlers() (/nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/clang-13+0x1e70274)
 #2 0x0000000001e703db SignalHandler(int) (/nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/clang-13+0x1e703db)
 #3 0x00007ff8804a4630 __restore_rt (/lib64/libpthread.so.0+0xf630)
 #4 0x00007ff87f5c3387 raise (/lib64/libc.so.6+0x36387)
 #5 0x00007ff87f5c4a78 abort (/lib64/libc.so.6+0x37a78)
 #6 0x00007ff87f5bc1a6 __assert_fail_base (/lib64/libc.so.6+0x2f1a6)
 #7 0x00007ff87f5bc252 (/lib64/libc.so.6+0x2f252)
 #8 0x0000000000d5013b (anonymous namespace)::GlobalOffset::runOnModule(llvm::Module&) (/nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/clang-13+0xd5013b)
 #9 0x00000000016141a6 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/clang-13+0x16141a6)
#10 0x000000000217ff44 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/clang-13+0x217ff44)
#11 0x0000000002181a93 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/clang-13+0x2181a93)
#12 0x0000000002eb2ba0 clang::CodeGenAction::ExecuteAction() (/nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/clang-13+0x2eb2ba0)
#13 0x00000000027fc0f9 clang::FrontendAction::Execute() (/nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/clang-13+0x27fc0f9)
#14 0x000000000279f2de clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/clang-13+0x279f2de)
#15 0x00000000028cce08 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/clang-13+0x28cce08)
#16 0x00000000009d5857 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/clang-13+0x9d5857)
#17 0x00000000009d1548 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/clang-13+0x9d1548)
#18 0x000000000094da16 main (/nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/clang-13+0x94da16)
#19 0x00007ff87f5af555 __libc_start_main (/lib64/libc.so.6+0x22555)
#20 0x00000000009d1093 _start (/nfs/pdx/home/schulzro/sycl/build.devtoolset.cuda/bin/clang-13+0x9d1093)
clang-13: error: unable to execute command: Aborted (core dumped)
clang-13: error: clang frontend command failed due to signal (use -v to see invocation) clang version 13.0.0 (/nfs/pdx/home/schulzro/sycl/clang f640bd0bf6225c84f489b05af2454bdaac6c92c7)
Target: x86_64-unknown-linux-gnu
Thread model: posix

gmx-74893b.zip

(filename doesn't match because I copied error and file from two different invocations)

@rolandschulz rolandschulz added the bug Something isn't working label Feb 28, 2021
rolandschulz added a commit to rolandschulz/llvm that referenced this issue Feb 28, 2021
@bader bader added the cuda CUDA back-end label Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cuda CUDA back-end
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants