intel / intel/llvm

[SYCL][CUDA] Build failed with fatal error "error in backend: Undefined external symbol "exp""

Open
#7,386 10 comments 0 reactions 0 assignees View on GitHub
bug cuda
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

**Description of the bug:**
SYCL compilation failing with below error for Quda "feature-sycl" branch [QUDA-SYCL](https://github.com/lattice/quda/tree/feature/sycl)

fatal error: error in backend: Undefined external symbol "exp"
llvm-foreach:
clang-15: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 15.0.0 (https://github.com/intel/llvm.git 0c7a1e18978754451f5c2c95129721297e2c2411)
Target: x86_64-unknown-linux-gnu
Thread model: posix

**To Reproduce**

1. git clone [QUDA](https://github.com/lattice/quda)
2. git checkout feature/sycl
3. cd quda
4. append CMAKE_CXX_FLAGS_xxx and CMAKE_C_FLAGS_xxx with "-fsycl -fsycl-targets=nvptx64-nvidia-cuda"
5. mkdir build, cd build
6. cmake ../ -DQUDA_TARGET_TYPE=SYCL -DCMAKE_CXX_COMPILER=clang++
7. Build fails with fatal error

**Environment:**

- OS: Linux
- Target device and vendor: NVIDIA GPU - Tesla T4
- CLANG++ version: 15.0.0

**Additional context**
Compilation is successful with "DPC++" compiler

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.