Skip to content

Compiler crash at pass 'SYCL Local Accessor to Shared Memory' on CUDA backend caused by https://github.com/intel/llvm/pull/5149 #5600

@jingwan2

Description

@jingwan2

Describe the bug
Compiler crash at pass 'SYCL Local Accessor to Shared Memory' on CUDA backend, caused by #5149

To Reproduce

  1. CUDA backend compiler 58508ba or later

  2. Get attached main.txt and foo.txt, rename to main.cpp and foo.cpp

  3. clang++ -fsycl -fsycl-unnamed-lambda -fsycl-targets=nvptx64-nvidia-cuda-sycldevice main.cpp foo.cpp

Log

  1. Code generation
  2. Running pass 'SYCL Local Accessor to Shared Memory' on module '/tmp/main-edc15a/main-sm_50.bc'.
    Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var LLVM_SYMBOLIZER_PATH to point to it):
    bin/clang++(+0x24d4e64)[0x561ba6e2ce64]
    bin/clang++(+0x24d258e)[0x561ba6e2a58e]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7fcd901e93c0]
    bin/clang++(+0x24e6c65)[0x561ba6e3ec65]
    bin/clang++(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x382)[0x561ba64acb62]
    bin/clang++(+0x284e99e)[0x561ba71a699e]
    bin/clang++(_ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_19HeaderSearchOptionsERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsEN4llvm9StringRefEPNSE_6ModuleENS_13BackendActionESt10unique_ptrINSE_17raw_pwrite_streamESt14default_deleteISK_EE+0x49e)[0x561ba71ab8ce]
    :bin/clang++(_ZN5clang13CodeGenAction13ExecuteActionEv+0xfbe)[0x561ba802a04e]
    :bin/clang++(_ZN5clang14FrontendAction7ExecuteEv+0xd9)[0x561ba7941799]
    :bin/clang++(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x14e)[0x561ba78ccd9e]
    :bin/clang++(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x213)[0x561ba7a25153]
    :bin/clang++(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x68c)[0x561ba56eed8c]
    :bin/clang++(+0xd93228)[0x561ba56eb228]
    :bin/clang++(main+0x3e9)[0x561ba566f849]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7fcd8fa680b3]
    :bin/clang++(_start+0x2e)[0x561ba56ead9e]
    llvm-foreach: Segmentation fault (core dumped)
    clang++: error: clang frontend command failed with exit code 254 (use -v to see invocation)

It compile pass if without #5149.
WA is don't compile foo.cpp since it's included in main.cpp:
clang++ -fsycl -fsycl-unnamed-lambda -fsycl-targets=nvptx64-nvidia-cuda-sycldevice main.cpp

Environment (please complete the following information):

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompilerCompiler related issuecudaCUDA back-end

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions