intel / intel/llvm

Unable to build with CUDA backend for NVIDIA Jetson

Open
#3,325 9 comments 0 reactions 0 assignees View on GitHub
cuda Documentation enhancement
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

**Describe the bug**
I am attempting to build DPC++ with CUDA backend for a Jetson TX2 that is running Ubuntu 18.04. The CPUs are AARCH64, but I'm only interested in the CUDA backend.

Eventually, the build will fail with:
`error: unable to create target: 'No available targets are compatible with triple "aarch64-unknown-linux-gnu"'`

**To Reproduce**
Please describe the steps to reproduce the behavior:

Run the following on a Jetson TX2:

```
python $DPCPP_HOME/llvm/buildbot/configure.py --cuda --no-werror
python $DPCPP_HOME/llvm/buildbot/compile.py

```

1. Include code snippet as short as possible: N/A
2. Specify the command which should be used to compile the program: See above
3. Specify the comment which should be used to launch the program: N/A
4. Indicate what is wrong and what was expected

The build eventually fails with:

```
$ python $DPCPP_HOME/llvm/buildbot/compile.py
args:Namespace(base_branch=None, branch=None, build_number=None, build_parallelism=None, builder_dir=None, obj_dir=None, pr_number=None, src_dir=None)
[Cmake Command]: cmake --build /home/user/sycl_workspace/llvm/build -- deploy-sycl-toolchain deploy-opencl-aot -j 4
[1/649] Generating ../../lib/libsycl-crt.o
FAILED: lib/libsycl-crt.o
cd /home/user/sycl_workspace/llvm/build/tools/libdevice && /home/user/sycl_workspace/llvm/build/bin/clang-13 -fsycl -c -Wno-sycl-strict -Wno-undefined-internal -sycl-std=2017 -fsycl-targets=spir64_x86_64-unknown-unknown-sycldevice,spir64_gen-unknown-unknown-sycldevice,spir64_fpga-unknown-unknown-sycldevice,spir64-unknown-unknown-sycldevice /home/user/sycl_workspace/llvm/libdevice/crt_wrapper.cpp -o /home/user/sycl_workspace/llvm/build/lib/libsycl-crt.o
error: unable to create target: 'No available targets are compatible with triple "aarch64-unknown-linux-gnu"'
1 error generated.
[2/649] Generating ../../lib/libsycl-complex.o
FAILED: lib/libsycl-complex.o
cd /home/user/sycl_workspace/llvm/build/tools/libdevice && /home/user/sycl_workspace/llvm/build/bin/clang-13 -fsycl -c -Wno-sycl-strict -Wno-undefined-internal -sycl-std=2017 -fsycl-targets=spir64_x86_64-unknown-unknown-sycldevice,spir64_gen-unknown-unknown-sycldevice,spir64_fpga-unknown-unknown-sycldevice,spir64-unknown-unknown-sycldevice /home/user/sycl_workspace/llvm/libdevice/complex_wrapper.cpp -o /home/user/sycl_workspace/llvm/build/lib/libsycl-complex.o
error: unable to create target: 'No available targets are compatible with triple "aarch64-unknown-linux-gnu"'
1 error generated.
[3/649] Generating ../../lib/libsycl-complex-fp64.o
FAILED: lib/libsycl-complex-fp64.o
cd /home/user/sycl_workspace/llvm/build/tools/libdevice && /home/user/sycl_workspace/llvm/build/bin/clang-13 -fsycl -c -Wno-sycl-strict -Wno-undefined-internal -sycl-std=2017 -fsycl-targets=spir64_x86_64-unknown-unknown-sycldevice,spir64_gen-unknown-unknown-sycldevice,spir64_fpga-unknown-unknown-sycldevice,spir64-unknown-unknown-sycldevice /home/user/sycl_workspace/llvm/libdevice/complex_wrapper_fp64.cpp -o /home/user/sycl_workspace/llvm/build/lib/libsycl-complex-fp64.o
error: unable to create target: 'No available targets are compatible with triple "aarch64-unknown-linux-gnu"'
1 error generated.
[4/649] Generating ../../lib/libsycl-cmath.o
FAILED: lib/libsycl-cmath.o
cd /home/user/sycl_workspace/llvm/build/tools/libdevice && /home/user/sycl_workspace/llvm/build/bin/clang-13 -fsycl -c -Wno-sycl-strict -Wno-undefined-internal -sycl-std=2017 -fsycl-targets=spir64_x86_64-unknown-unknown-sycldevice,spir64_gen-unknown-unknown-sycldevice,spir64_fpga-unknown-unknown-sycldevice,spir64-unknown-unknown-sycldevice /home/user/sycl_workspace/llvm/libdevice/cmath_wrapper.cpp -o /home/user/sycl_workspace/llvm/build/lib/libsycl-cmath.o
error: unable to create target: 'No available targets are compatible with triple "aarch64-unknown-linux-gnu"'
1 error generated.
```

**Environment (please complete the following information):**

- OS: Ubuntu 18.04 aarch64
- Target device and vendor: Jetson TX2 (CUDA)
- DPC++ version: commit 78a0b199e1f334938da9d7d1fabcf94937571482
- Dependencies version: N/A

**Additional context**

HipSYCL does build on this target using CUDA, but is missing functionality.

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.