Closed bheisler closed 6 years ago
Unfortunately, it's known limitation of *-pc-windows-msvc
Rustc targets. Can you please try *-pc-windows-gnu
?
The problem originates in rustc-llvm-proxy and I created a ticket there: https://github.com/denzp/rustc-llvm-proxy/issues/1
Tried using nightly-x86_64-pc-windows-gnu
- that causes it to fail in a different way:
error: failed to run custom build command for `chapter-1 v0.1.0 (file:///C:/Users/Brook/workspace/rust-inline-cuda-tutorial/chapter-1/host)`
process didn't exit successfully: `C:\Users\Brook\workspace\rust-inline-cuda-tutorial\target\debug\build\chapter-1-11d782cbdb9b9a40\build-script-build` (exit code: 1)
--- stdout
cargo:rustc-env=KERNEL_PTX_PATH=C:\Users\Brook\AppData\Local\Temp\ptx-builder\chapter_1_kernel\2777747bd38bda2e\target\nvptx64-nvidia-cuda/release/proxy.ptx
--- stderr
[PTX] Internal error: Paths misalignment in deps file
Sorry, it took me a while to fix this and pass all test without access to the real Windows environment.
I published ptx-builder
version 0.4.0
with x86_64-pc-windows-gnu
support.
It would be nice if this was listed in the README, the issue is hidden and you have to search for the error message to find it.
also @bheisler how did you handle the error "note: ld: cannot find -lcuda" for windows?
@TuckerBMorgan I'm using git-bash(/MinGW) as my shell, so I just used export LIBRARY_PATH="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\lib\x64"
. Of course, you'll need to install the CUDA toolkit. If you're using Powershell or something you'll need to adapt this to however you set environment variables.
@bheisler Thanks!, I am trying to run your code and I will get "LaunchFailure", or "LaunchTimeout" after it runs for a little bit, and I never get a output image.
That sounds like the watchdog timer killing the CUDA kernel. If you're running a kernel on the same GPU as your display, most operating systems will reset the card and kill the kernel if it runs longer than a few seconds. The screen can't update while the kernel is running, so this helps ensure that a long-running (or infinite-looping) kernel doesn't lock up the machine.
If you're using my path tracer code, you might have to play around with the complexity of the scene or the ROUND_COUNT/RAY_COUNT constants in the kernel to find a workload that your card can complete without hitting the timeout.
I tried to compile some of the code from rust-inline-cuda-tutorial on Windows, and encountered this error:
I think this is the important bit:
Unable to find symbol 'LLVMContextCreate' in the LLVM shared lib