runtime
runtime copied to clipboard
rules_cuda example failed.
bazel run --cuda //examples:hello_cuda failed with the log below:
INFO: Build option --@rules_cuda//cuda:cuda_targets has changed, discarding analysis cache.
INFO: Analyzed target //examples:hello_cuda (20 packages loaded, 1579 targets configured).
INFO: Found 1 target...
Target //examples:hello_cuda up-to-date:
bazel-bin/examples/hello_cuda
INFO: Elapsed time: 0.730s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
CUDA error: initialization error
CUDA error: initialization error
I can't reproduce this. Do you have an NVIDIA GPU with sm_52 or later? What's your output of nvidia-smi?
Next, I would try to prefix your bazel command with LD_DEBUG=libs