CUDA ERROR
the provided PTX was compiled with an unsupported toolchain.
The driver JIT is older than the toolkit that emitted the PTX. Measured with CUDA 13.3 PTX on a 13.2-capable driver while the matching cubin ran.
The driver has to JIT PTX produced by a newer toolkit than its embedded compiler understands. A matching real cubin may still run because it bypasses that compilation step.
| Enum | cudaErrorUnsupportedPtxVersion |
| Code | 222 |
| Runtime string | the provided PTX was compiled with an unsupported toolchain. |
| Source | https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html (CUDA 13.3, checked 2026-08-29) |
The period is part of the runtime string. Code 222 is the only string in the project's CUDA 12.6 dump that ends this way, so copy it exactly.
Measured reproduction
On a Tesla T4 with driver 595.84, whose runtime reports CUDA 13.2 support, we built a PTX-only binary with CUDA 13.3 (V13.3.73) and disabled the JIT cache. From code/errors/unsupported-ptx-toolchain/evidence/run-2026-09-01.txt:
driver supports CUDA 13.2, runtime is CUDA 13.3
launch: cudaErrorUnsupportedPtxVersion: the provided PTX was compiled with an unsupported toolchain.
sync: cudaSuccess: no error
The same source built as a real sm_75 cubin with the same 13.3 toolkit returned cudaSuccess at launch and sync. Only the PTX path failed, which isolates the driver's JIT compiler rather than the runtime library or kernel.
Cause 1: the toolkit is newer than the driver JIT
This is the measured case. Fix it by upgrading the driver, downgrading the toolkit, or compiling real SASS for the installed GPU so no JIT is needed. On a hosted notebook where you cannot change the driver, an explicit real target such as -arch=sm_75 is often the only available fix.
Cause 2: a library falls back to newer PTX
A library may carry cubins for other GPUs and PTX for yours. Install a library build matched to the host driver, or rebuild it with a real target for the card. Use gencode flags deliberately rather than relying on defaults.
Confirm it
Print cudaDriverGetVersion and cudaRuntimeGetVersion, then inspect the binary with cuobjdump -lelf -lptx -all. If it has no compatible ELF image and its PTX came from a newer toolkit, the JIT compilation boundary is the cause.
Related errors
a PTX JIT compilation failed(218): the driver understands the PTX version but cannot assemble its contents.no kernel image is available(209): no compatible cubin or usable PTX exists.invalid device function(98): a related image or symbol mismatch.
The lesson
Day 69 measures fat binaries and PTX fallback. Day 46 explains the virtual and real instruction sets. Toolchain setup starts at /setup/install-cuda, and the full code table is on the error hub.
Written 2026-09-02. Transcript from code/errors/unsupported-ptx-toolchain/evidence/run-2026-09-01.txt, captured on a Tesla T4, driver 595.84, with CUDA 13.3 PTX. Author and reviewer: not yet assigned.