Closed dbeckwith closed 6 years ago
I remember I had a similar problem, can be related to xargo#212. Cou you please try to update your xargo
?
Btw, unfortunately, I can't build it myself on latest nightly rustc 1.27.0-nightly (7f3444e1b 2018-04-26)
LLVM ERROR: Cannot select: intrinsic %llvm.nvvm.read.ptx.sreg.nctaid.x
error: Could not compile `chapter-1-kernel`.
warning: build failed, waiting for other jobs to finish...
LLVM ERROR: Cannot select: intrinsic %llvm.nvvm.read.ptx.sreg.nctaid.x
error: Could not compile `chapter-1-kernel`.
warning: build failed, waiting for other jobs to finish...
error: build failed
This is a tough error, I'm going to check for LLVM changes regarding to NVPTX...
Anyways, there should be possible to build the tutorial, until you update your Rust ;)
Edit: Oh, shame on me... I accidentally ran build on project root, and I was building everything for my host target... It works perfectly on latest nightly :)
Also I realized I meant to file this on https://github.com/denzp/rust-inline-cuda-tutorial, oops...
Yeah I had the same problem, first I was building from the project root and got something similar to that. The output above was from building in chapter-1/host
though. My version of xargo
should be pretty new, but I can try updating it later tonight. I'm fairly new to Rust so I'm not quite sure about something though, does the current default rustup
toolchain make a difference when I cargo install
something? If so, which toolchain should I use to install xargo
?
No problem the issue is related to the project as well ;)
When you do cargo install NAME
, the binary is being built with your default toolchain. And after that, it won't be rebuilt unless you run cargo install -f NAME
to update the application to the latest version.
Probably you can build xargo
with stable toolchain (if it doesn't depend on unstable features). But to use it, unfortunately, you'll need a nightly toolchain anyways.
Ah, okay I see. I will try out updating xargo
and see if that helps. Could you comment with the versions of xargo
and rustc
that you used?
Perhaps, I'll add versions validation to the ptx-builder
crate.
My versions are:
$ rustc -V
rustc 1.27.0-nightly (7f3444e1b 2018-04-26)
$ xargo -V
xargo 0.3.12
cargo 1.27.0-nightly (0a1add2d8 2018-04-20)
So before I had
$ xargo --version
xargo 0.3.7
cargo 1.26.0-nightly (008c36908 2018-04-13)
and now I have
$ xargo --version
xargo 0.3.12
cargo 1.27.0-nightly (0a1add2d8 2018-04-20)
and it works! Thanks for the help! Some version checking on ptx-builder
might be a good idea yeah.
I'm glad it helped!
BTW, version checking is implemented and published in ptx-builder v0.3.2
.
Not sure what to do about this error. I believe I have everything set up correctly, I have
xargo
andptx-linker
installed. But when I tried to build the example in chapter 1 I get this error:This is with
ptx-linker 0.5.1
andrustc 1.27.0-nightly (7360d6dd6 2018-04-15)
. Any ideas?I love this project BTW, hope you continue the tutorial!