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

bug during compilation for CPU #6

Open
AuroraPerego opened this issue Jun 14, 2023 · 1 comment
Open

bug during compilation for CPU #6

AuroraPerego opened this issue Jun 14, 2023 · 1 comment

Comments

@AuroraPerego
Copy link
Owner

When compiling the SYCL version of pixeltrack-standalone for the CPU backend with the 20230613 nightly, it crashes during the compilation of gpuVertexFinder.cc.
This DIDN'T happen with oldest nightlies (20230309 the latest tested).

Backtrace:

clang-17: /data/user/fwyzard/sycl/llvm/llvm/include/llvm/IR/Instructions.h:972: static llvm::GetElementPtrInst* llvm::GetElementPtrInst::Create(llvm::Type*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&, llvm::Instruction*): Assertion `cast<PointerType>(Ptr->getType()->getScalarType()) ->isOpaqueOrPointeeTypeMatches(PointeeType)' failed.
PLEASE submit a bug report to https://github.com/intel/llvm/issues and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/bin/clang-17 -cc1 -triple spir64_x86_64-unknown-unknown -aux-triple x86_64-unknown-linux-gnu -fsycl-is-device -fdeclare-spirv-builtins -mllvm -sycl-opt -fenable-sycl-dae -fsycl-instrument-device-code -Wno-sycl-strict -fsycl-int-header=/tmp/aperego/gpuVertexFinder-header-ca5ff2.h -fsycl-int-footer=/tmp/aperego/gpuVertexFinder-footer-1b23cc.h -sycl-std=2020 -ffine-grained-bitfield-accesses -fsycl-unique-prefix=1ef13760441332c0 -D__SYCL_TARGET_INTEL_X86_64__ -Wspir-compat -emit-llvm-bc -emit-llvm-uselists -disable-free -clear-ast-before-backend -main-file-name gpuVertexFinder.cc -fsycl-use-main-file-name -full-main-file-name /afs/cern.ch/user/a/aperego/public/pixeltrack-standalone/src/sycl/plugin-PixelVertexFinding/gpuVertexFinder.cc -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=all -ffp-contract=on -fno-rounding-math -fno-verbose-asm -mconstructor-aliases -aux-target-cpu x86-64 -aux-target-feature +sse3 -debug-info-kind=constructor -dwarf-version=5 -debugger-tuning=gdb -fcoverage-compilation-dir=/afs/cern.ch/user/a/aperego/public/pixeltrack-standalone/src/sycl -resource-dir /cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/clang/17 -dependency-file /afs/cern.ch/user/a/aperego/public/pixeltrack-standalone/obj/sycl/plugin-PixelVertexFinding/gpuVertexFinder.cc.d -MT /afs/cern.ch/user/a/aperego/public/pixeltrack-standalone/obj/sycl/plugin-PixelVertexFinding/gpuVertexFinder.cc.o -canonical-system-headers -internal-isystem /cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/bin/../include/sycl -internal-isystem /cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/bin/../include -isystem /afs/cern.ch/user/a/aperego/public/pixeltrack-standalone/external/tbb/include -isystem /afs/cern.ch/user/a/aperego/public/pixeltrack-standalone/external/eigen -isystem /afs/cern.ch/user/a/aperego/public/pixeltrack-standalone/external/boost/include -isystem /afs/cern.ch/user/a/aperego/public/pixeltrack-standalone/external/libbacktrace/include -D CPU_DEBUG -I /afs/cern.ch/user/a/aperego/public/pixeltrack-standalone/src/sycl -D LIB_DIR=/afs/cern.ch/user/a/aperego/public/pixeltrack-standalone/lib/sycl -D TBB_SUPPRESS_DEPRECATED_MESSAGES -D TBB_PREVIEW_NUMA_SUPPORT -D TBB_PREVIEW_TASK_GROUP_EXTENSIONS -D EIGEN_DONT_PARALLELIZE -D EIGEN_USE_SYCL -D EIGEN_NO_CUDA -internal-isystem /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12 -internal-isystem /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/x86_64-redhat-linux -internal-isystem /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/backward -internal-isystem /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12 -internal-isystem /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/x86_64-redhat-linux -internal-isystem /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/backward -internal-isystem /cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/clang/17/include -internal-isystem /usr/local/include -internal-isystem /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../x86_64-redhat-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -internal-isystem /cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/clang/17/include -internal-isystem /usr/local/include -internal-isystem /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../x86_64-redhat-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Werror=address -Wall -Werror=array-bounds -Wno-attributes -Werror=conversion-null -Werror=delete-non-virtual-dtor -Wno-deprecated -Werror=format -Wno-long-long -Werror=main -Werror=missing-braces -Werror=narrowing -Wnon-virtual-dtor -Werror=overflow -Werror=overlength-strings -Wparentheses -Werror=pointer-arith -Wno-psabi -Werror=reorder -Wreturn-type -Werror=return-type -Werror=sign-compare -Werror=strict-aliasing -Wstrict-overflow -Werror=switch -Werror=type-limits -Wunused -Wno-unused-local-typedefs -Werror=unused-value -Wno-error=unused-variable -Wno-vla -Werror=write-strings -Wfatal-errors -std=c++17 -fdebug-compilation-dir=/afs/cern.ch/user/a/aperego/public/pixeltrack-standalone/src/sycl -ferror-limit 19 -fvisibility-inlines-hidden -pthread -fgpu-rdc -fgnuc-version=4.2.1 -no-opaque-pointers -fcxx-exceptions -fexceptions -fcolor-diagnostics -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/aperego/gpuVertexFinder-ef5fd5.bc -x c++ /afs/cern.ch/user/a/aperego/public/pixeltrack-standalone/src/sycl/plugin-PixelVertexFinding/gpuVertexFinder.cc
1.      <eof> parser at end of file
2.      Optimizer
 #0 0x00007fd100f838eb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMSupport.so.17git+0x1b88eb)
 #1 0x00007fd100f812f4 SignalHandler(int) Signals.cpp:0:0
 #2 0x00007fd105b31cf0 __restore_rt (/lib64/libpthread.so.0+0x12cf0)
 #3 0x00007fd100122aff raise (/lib64/libc.so.6+0x4eaff)
 #4 0x00007fd1000f5ea5 abort (/lib64/libc.so.6+0x21ea5)
 #5 0x00007fd1000f5d79 _nl_load_domain.cold.0 (/lib64/libc.so.6+0x21d79)
 #6 0x00007fd10011b456 (/lib64/libc.so.6+0x47456)
 #7 0x00007fd102c58343 llvm::GetElementPtrInst::Create(llvm::Type*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::Twine const&, llvm::Instruction*) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMScalarOpts.so.17git+0x16e343)
 #8 0x00007fd102c58c71 llvm::IRBuilderBase::CreateGEP(llvm::Type*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::Twine const&, bool) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMScalarOpts.so.17git+0x16ec71)
 #9 0x00007fd102c5a894 hoistGEP(llvm::Instruction&, llvm::Loop&, llvm::ICFLoopSafetyInfo&, llvm::MemorySSAUpdater&, llvm::AssumptionCache*, llvm::DominatorTree*) LICM.cpp:0:0
#10 0x00007fd102c65615 llvm::hoistRegion(llvm::DomTreeNodeBase<llvm::BasicBlock>*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::TargetLibraryInfo*, llvm::Loop*, llvm::MemorySSAUpdater&, llvm::ScalarEvolution*, llvm::ICFLoopSafetyInfo*, llvm::SinkAndHoistLICMFlags&, llvm::OptimizationRemarkEmitter*, bool, bool) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMScalarOpts.so.17git+0x17b615)
#11 0x00007fd102c6b859 (anonymous namespace)::LoopInvariantCodeMotion::runOnLoop(llvm::Loop*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::TargetLibraryInfo*, llvm::TargetTransformInfo*, llvm::ScalarEvolution*, llvm::MemorySSA*, llvm::OptimizationRemarkEmitter*, bool) (.part.0) LICM.cpp:0:0
#12 0x00007fd102c6e3a8 llvm::LICMPass::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMScalarOpts.so.17git+0x1843a8)
#13 0x00007fd0ff61ea7e llvm::detail::PassModel<llvm::Loop, llvm::LICMPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMPasses.so.17git+0x62a7e)
#14 0x00007fd102cdb1f0 llvm::FunctionToLoopPassAdaptor::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMScalarOpts.so.17git+0x1f11f0)
#15 0x00007fd0ff61d67e llvm::detail::PassModel<llvm::Function, llvm::FunctionToLoopPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMPasses.so.17git+0x6167e)
#16 0x00007fd106ed2f7b llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMNVPTXCodeGen.so.17git+0x9bf7b)
#17 0x00007fd10201d06f llvm::CGSCCToFunctionPassAdaptor::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMAnalysis.so.17git+0x13906f)
#18 0x00007fd10658be4e llvm::detail::PassModel<llvm::LazyCallGraph::SCC, llvm::CGSCCToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMAMDGPUCodeGen.so.17git+0x2e6e4e)
#19 0x00007fd102014b88 llvm::PassManager<llvm::LazyCallGraph::SCC, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMAnalysis.so.17git+0x130b88)
#20 0x00007fd103e59c3e llvm::detail::PassModel<llvm::LazyCallGraph::SCC, llvm::PassManager<llvm::LazyCallGraph::SCC, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMipo.so.17git+0x1c9c3e)
#21 0x00007fd102018c55 llvm::DevirtSCCRepeatedPass::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMAnalysis.so.17git+0x134c55)
#22 0x00007fd103e59c1e llvm::detail::PassModel<llvm::LazyCallGraph::SCC, llvm::DevirtSCCRepeatedPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMipo.so.17git+0x1c9c1e)
#23 0x00007fd102016cb5 llvm::ModuleToPostOrderCGSCCPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMAnalysis.so.17git+0x132cb5)
#24 0x00007fd103e605e3 llvm::ModuleInlinerWrapperPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMipo.so.17git+0x1d05e3)
#25 0x00007fd0ff61d1de llvm::detail::PassModel<llvm::Module, llvm::ModuleInlinerWrapperPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMPasses.so.17git+0x611de)
#26 0x00007fd101a74f6c llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libLLVMCore.so.17git+0x2c1f6c)
#27 0x00007fd104cc87d0 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&) BackendUtil.cpp:0:0
#28 0x00007fd104ccbcf4 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>>) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libclangCodeGen.so.17git+0xeccf4)
#29 0x00007fd10513e722 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libclangCodeGen.so.17git+0x55f722)
#30 0x00007fd0fca6937a clang::ParseAST(clang::Sema&, bool, bool) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libclangParse.so.17git+0x3537a)
#31 0x00007fd1051412a2 clang::CodeGenAction::ExecuteAction() (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libclangCodeGen.so.17git+0x5622a2)
#32 0x00007fd10375c7f9 clang::FrontendAction::Execute() (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libclangFrontend.so.17git+0x1257f9)
#33 0x00007fd1036d3bf6 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libclangFrontend.so.17git+0x9cbf6)
#34 0x00007fd105b1accf clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/lib/libclangFrontendTool.so.17git+0x4ccf)
#35 0x0000000000415174 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/bin/clang-17+0x415174)
#36 0x0000000000411303 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#37 0x0000000000412824 clang_main(int, char**, llvm::ToolContext const&) (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/bin/clang-17+0x412824)
#38 0x000000000040bc51 main (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/bin/clang-17+0x40bc51)
#39 0x00007fd10010ed85 __libc_start_main (/lib64/libc.so.6+0x3ad85)
#40 0x000000000040bc8e _start (/cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/bin/clang-17+0x40bc8e)
clang++: fatal error: unable to execute command: Aborted (core dumped)
clang version 17.0.0 (https://github.com/intel/llvm 6b7424349ee3592909afde25f9921c4e8b83db10)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /cvmfs/patatrack.cern.ch/externals/x86_64/rhel8/intel/sycl/nightly/20230613/bin

How to reproduce:

git clone https://github.com/cms-patatrack/pixeltrack-standalone.git
cd pixeltrack-standalone
# change the SYCL_BASE at line 157 with the path to the latest nightly
make environment
source env.sh
CPU_FLAGS=1 make -j`nproc` sycl USER_CXXFLAGS="-DCPU_DEBUG"

or execute the command in the backtrace after downloading the external libraries.

Info:
gcc version: 8.5.0 20210514 (Red Hat 8.5.0-16)
clang++ version: 17.0.0 (https://github.com/intel/llvm 6b7424349ee3592909afde25f9921c4e8b83db10) - sycl-nightly/20230613
rocm version used to build clang++: rocm-5.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants