30131
Hardware

Rust 1.97 Increases Baseline for nvptx64-nvidia-cuda Target: What You Need to Know

Overview of the nvptx64-nvidia-cuda Target

The nvptx64-nvidia-cuda target is Rust's compilation target for NVIDIA GPUs. When you compile code for this target, the output is PTX (Parallel Thread Execution) intermediate code. Two key version choices shape that output:

Rust 1.97 Increases Baseline for nvptx64-nvidia-cuda Target: What You Need to Know
Source: blog.rust-lang.org
  • GPU architecture (for example, sm_70, sm_80) – determines which GPUs can run the PTX code.
  • PTX ISA version – determines which CUDA driver versions can load and JIT-compile the PTX.

Starting with Rust 1.97 (scheduled for release on July 9, 2026), the baseline PTX ISA version and GPU architecture for this target will be raised. This change affects both the Rust compiler (rustc) and related host tooling, and it will no longer be possible to generate PTX artifacts compatible with older GPUs or older CUDA drivers.

New Minimum Supported Versions

The updated minimum requirements are:

  • PTX ISA 7.0 – Requires a CUDA 11 driver or newer.
  • SM 7.0 – GPUs with compute capability below 7.0 (e.g., Maxwell or Pascal) are no longer supported.

This means that any code generated by Rust 1.97 will target at least the Volta architecture (compute capability 7.0) and require a CUDA driver version that supports PTX ISA 7.0.

Why Are the Requirements Being Changed?

Until now, Rust has supported emitting PTX for a wide range of GPU architectures and PTX ISA versions. However, in practice, several defects existed that could cause valid Rust code to trigger compiler crashes or miscompilations. Raising the baseline addresses these issues and enables more complete support for the remaining supported hardware.

Removing support affects users of the architectures being removed. In this case, the most recent affected GPU architectures date back to 2017 and are no longer actively supported by NVIDIA. We therefore expect the overall impact of this change to be limited.

Maintaining support for these older architectures would require substantial effort. These removals let us focus development efforts on improving correctness and performance for currently supported hardware.

Impact on Users

When you update to Rust 1.97, the changes will affect you in the following ways:

  • If you need to target a CUDA driver that does not support PTX ISA 7.0 (CUDA 10-era drivers and older), Rust 1.97 will no longer be able to generate PTX compatible with that environment.
  • Similarly, if you need to run on GPUs with compute capability below 7.0 (for example, Maxwell or Pascal), Rust 1.97 will no longer be able to generate compatible PTX for those GPUs.

Assuming you are targeting a CUDA driver compatible with CUDA 11 or newer and using GPUs with compute capability 7.0 or newer, the following scenarios apply:

  • If you do not specify -C target-cpu, the new default will be sm_70, and your build should continue to work (but will no longer be compatible with pre-Volta GPUs).
  • If you currently specify an older -C target-cpu (for example, sm_60), you will need to either:
    • Remove that flag and let it default to sm_70, or
    • Update it to sm_70 or a newer architecture.
  • If you already specify -C target-cpu=sm_70 (or newer), there should be no behavioral changes from this update.

What to Do When Upgrading to Rust 1.97

To prepare for the upgrade, review your build configuration:

  1. Check the CUDA driver version on your target systems. If it's below CUDA 11, you will need to upgrade the driver to continue using Rust-generated PTX.
  2. Verify the compute capability of the GPUs you intend to run on. If they are below 7.0 (e.g., Maxwell, Pascal), you will need to upgrade your hardware or pin an older Rust version.
  3. Update any -C target-cpu flags in your build scripts or configuration files to at least sm_70.

For more details on building and configuring the nvptx64-nvidia-cuda target, refer to the platform support documentation.

Conclusion

Raising the baseline for the nvptx64-nvidia-cuda target in Rust 1.97 is a forward-looking move that improves compiler stability and performance for modern NVIDIA hardware. While it requires dropping support for older GPUs and CUDA drivers, the affected hardware is no longer actively supported by NVIDIA. Most users will find the transition straightforward, especially if they are already on CUDA 11 or later and using Volta or newer GPUs. By planning ahead and updating your build settings, you can ensure a smooth upgrade experience.

💬 Comments ↑ Share ☆ Save