Skip to content

docs(github): ask bug reports for cargo oxide doctor, not four hand-collected facts - #956

Merged
nihalpasham merged 2 commits into
NVIDIA:mainfrom
vyncint:docs/bug-template-doctor
Aug 17, 2026
Merged

nihalpasham merged 2 commits into
NVIDIA:mainfrom
vyncint:docs/bug-template-doctor

Conversation

@vyncint

@vyncint vyncint commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

The gap

bug_report.md asks reporters to assemble the environment by hand:

- GPU:
- CUDA driver version:
- `rustc --version --verbose`:
- `llc --version` (or `llc-22 --version`):

cargo oxide doctor already prints all four — and it appears nowhere outside a CI job name: not in the template, not in CONTRIBUTING, not in the book.

What it adds over the four fields

Real output from this machine:

Pinned toolchain active... ✓ nightly-2026-04-03-... (overridden by '.../rust-toolchain.toml')
Codegen backend... ✓ /.../librustc_codegen_cuda.so
Shared cache (external projects)... ⚠ /home/.../librustc_codegen_cuda.so
  Older than the backend built here, so projects outside this
  repository would load a different one.
libNVVM (libnvvm.so)... ✓ libNVVM 2.0
llc (LLVM)... ✓ LLVM version 22.1.2-rust-... (/.../bin/llc)

Several of those separate "the compiler is broken" from "this checkout loads a different backend than you think" — a common enough answer to want in the first message rather than the third.

Scope

The four fields stay, under "If doctor itself is what fails" — an environment broken enough to stop doctor is exactly when they are still needed. The output goes in a <details> block so a long paste does not bury the reproducer.

No GPU, no code change.

vyncint and others added 2 commits August 17, 2026 06:26
…-collected facts

The template asks reporters to assemble the environment by hand:

  - GPU:
  - CUDA driver version:
  - `rustc --version --verbose`:
  - `llc --version` (or `llc-22 --version`):

`cargo oxide doctor` already prints all four, and it is not mentioned anywhere
outside a CI job name -- not in the template, not in CONTRIBUTING. Its output
covers every field above and the ones triage asks for next: which toolchain is
actually active and whether the pin took, the rustup components, the backend
`.so` it would load and whether the shared cache is stale, cuda.h, libNVVM,
nvJitLink, libdevice, the resolved `llc` with its path and version, clang's
resource dir, and whether cuda-gdb and compute-sanitizer are present.

Several of those distinguish "the compiler is broken" from "this checkout picks
up a different backend than you think", which is a common enough answer to be
worth having in the first message rather than the third.

The four fields stay, under "if `doctor` itself is what fails" -- an
environment broken enough to stop `doctor` is exactly when they are still
needed.

Signed-off-by: Vyncint Ng <[email protected]>
The rewritten bug template says doctor reports "the GPU and driver",
but doctor's nvidia-smi query was name,compute_cap only, so the CUDA
driver version (an old template field) silently dropped out of the
standard reporting path. Driver version matters for triage: PTX-JIT
and driver-API compatibility bugs are driver-version-specific.

Extend the query to name,compute_cap,driver_version and print it:

  NVIDIA driver / GPU... ✓ NVIDIA GeForce RTX 5090
    (compute capability 12.0, driver 580.173.02)

Parsing splits on the last two commas: GPU names may contain commas in
principle, compute_cap and driver_version never do.
@nihalpasham nihalpasham added QoL-improvement Quality-of-life improvement; not a correctness fix documentation Improvements or additions to documentation cargo-oxide The `cargo oxide` subcommand and build automation labels Aug 17, 2026
@nihalpasham

Copy link
Copy Markdown
Collaborator

One gap: the template says doctor reports "the GPU and driver", but doctor never printed the driver version, so that field would quietly vanish from reports.

Layered one commit extending doctor instead of rewording the template:

  • the nvidia-smi query now asks for driver_version and the GPU line prints it,
  • parse splits on the last two commas (GPU names can contain commas, the other two fields can't),
  • 176 crate tests pass, and the line checks out live on an RTX 5090.

Merging.

@nihalpasham
nihalpasham merged commit 3e29c10 into NVIDIA:main Aug 17, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cargo-oxide The `cargo oxide` subcommand and build automation documentation Improvements or additions to documentation QoL-improvement Quality-of-life improvement; not a correctness fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants