compiler-explorer / compiler-explorer/infra
Add support for NVIDIA and AMD SYCL targets with the intel compiler
- Dominant language
- Python
- Stars
- 434
- Forks
- 429
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 38
Description
I would love to be able to select:
* language: C++
* compiler: icx (recent versions)
* compiler flags: `-fsycl -fsycl-targets=nvptx64-nvidia-cuda`
and successfully compile and browse PTX device code. It would be also amazing if the `amdgcn-amd-amdhsa` target could be also supported in a similar way.
The support for NVIDIA and AMD device code generation from SYCL is part of the open-source [Intel LLVM fork](https://github.com/intel/llvm/), but it is not enabled by default and thus not shipped either in the oneAPI toolkit releases or in the nightly builds in GitHub. Codeplay provides binaries to patch (plug-in) the support on top of the oneAPI releases (currently for 2023.0 and 2023.1) for a limited set of platforms at https://developer.codeplay.com/. Scripted downloads are currently possible after creating a free user account and generating an API token.
The plug-in installation requires simply downloading and executing a shell script. IIUC we could add it quite easily here:
https://github.com/compiler-explorer/infra/blob/1040b3d9caf6569a6bbd65a4c4e9f91c85407021/bin/yaml/cpp.yaml#L807
and also add the required CUDA and ROCm device library locations in the compiler environment.
The only question would be library version compatibility. Currently, our plug-in binary release matrix is:
|oneAPI|CUDA|ROCm|OS|
|---|---|---|---|
|2023.1.0|12.0|4.5.2, 5.4.3|Ubuntu 22.04|
|2023.0.0|11.7|4.5.2|Ubuntu 20.04|
Some level of compatibility is expected for other versions of CUDA/ROCm and OS, but not guaranteed to work. We could discuss providing binaries in another configuration through other channels if these turn out to not work for Compiler Explorer.
Happy to help with configuring / testing this in the near future.
Contributor guide
Assessment
This issue has not been assessed yet.