Conversation
…ing GPUs CudaBuilder defaults to NvvmArch::Compute75, chosen for CUDA 13 compatibility. Following the getting-started example as-is on any older GPU (Maxwell/Pascal/Volta) produces PTX that fails to load at runtime with a bare InvalidPtx error, with nothing pointing at the architecture mismatch. Add a note pointing readers at .arch(...) and nvidia-smi's compute_cap query. Hit this firsthand on a GTX 1070 (sm_61); see Rust-GPU#410 for the runtime diagnostics side of this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CudaBuilder's default target (NvvmArch::Compute75) is Turing+ only. Following the getting-started example as-is on an older GPU (Maxwell/Pascal/Volta — e.g. any GTX 10-series card) produces PTX that fails at runtime with a bareInvalidPtxand no hint that architecture is the cause.build.rs/arch()section pointing readers at setting.arch(...)explicitly and atnvidia-smi --query-gpu=compute_cap --format=csvfor finding their GPU's compute capability.Filed alongside #410, which proposes improving the runtime error message itself (a separate, code-level change); this PR is just the documentation half so newcomers on older hardware aren't stuck debugging a generic error with no lead.
Hit this firsthand getting the guide's vecadd example running on a GTX 1070 with CUDA 12.9.
Test plan
mdbook build guideto confirm the callout formats correctly.