Rust-GPU/rust-cuda

Add to godbolt

Opened this issue · 6 comments

It would be great to have rust-cuda on https://godbolt.org/.

The repo is here:

https://github.com/compiler-explorer/compiler-explorer

I‘d like to take this issue, and here are two related commits. I have tested it with the master branch of Rust-CUDA and it can work. However, there are two problems I'd like to discuss, before I open a PR to the compiler-explorer.

  • The commit in compiler-explorer is based on cargo, to utilize the cuda-builder in Rust-CUDA. However, most configurations on compiler-explorer choose a minimal compiler, such as rustc. I don't know if this is as Rust-CUDA/compiler-explorer expected.
  • The commit in infra tries to install minimal Rust-CUDA crates on the compiler-explorer server. However, the last release of Rust-CUDA cannot work with current nightly rust toolchains. It seems a newer Rust-CUDA version should be released on crates.io, so that we can deploy it on the compiler-explorer.

For the first, I guess that would be up to the compiler explorer folks as to what they want. We also have other options (writing a driver "compiler" binary that just uses cuda-builder, manually copying the rustc invocation from what cuda-builder does, etc).

Is there a way we can specify a specific toolchain? While the project jumps forward every now and then, we don't track nightly 100%

Fine, for the first question on commit in compiler-explorer, let's wait for their response.
As for my second question, I forgot that the latest Rust-CUDA can be imported via git repo... Therefore, it can be fixed easily.

For your question on toolchain: The compiler-explorer supports all of stable versions and a nightly version Rust toolchains. But for now, Rust-CUDA simply relies on the nightly version? So I did not care about the toolchain versions on compiler-explorer.

The commit in compiler-explorer simply want to add a master version of Rust-CUDA, just as rust-cg-gcc (master) in the following figure. For the old Rust-CUDA releases (it has been several years ago), I don't know if it worth to add.

Image

Definitely not worth adding older versions, agreed!