Skip to content

0.1.5

Choose a tag to compare

@nbald nbald released this 24 Nov 11:55
· 187 commits to main since this release
  • A kernel whose code is a trap and nothing else is refused at its launch instead of faulting the GPU. A kernel built for some architectures only is emitted for the others with a body that traps; launched, it ended the context and the GPU wrote an Xid 43 line. The layer still gives such a kernel at the lookup, as NVIDIA's driver does, but every launch function and a kernel node of a graph now return error 218 without calling the driver, a line names the kernel and its image (kernel NAME has no code in its image (N bytes, XXH64 X): its body is a trap and nothing else; CALL with it is refused (error 218)), and the context goes on. This is what stopped Strata's CUDA 13 engine 0.1.66 on prompts of 4,096 tokens or more (issue #3, second report): when it detects the layer, that engine chooses int8 expert kernels for Volta that its CUDA 13 build carries only as such stubs. With 0.1.5 the engine still stops on those prompts, at that error (the server answers 503) and without a GPU fault: it needs STRATA_I8_SM70=0, with which it read prompts of 4,021 to 35,124 tokens at about 92 % of the speed of the native CUDA 12 engine and generated at 85 to 92 % of it, with the native engine's text, on two V100s (Strata guide).
  • A refused kernel that a program holds without a lookup is refused at its use. cuFFT enumerates the functions of its modules through a private table of the driver, and so held, told 8.0, kernels that the layer refuses; launched, they trapped and ended the context. Such a handle is now refused with error 218 by every launch function, by a kernel node of a graph when it is made or changed, and by the questions and settings that take a function, without calling the driver, and a line names the kernel. While a module or library with a refused kernel is loaded, the first launch of each handle after a load or an unload asks the driver what it is, 1.4 to 2.0 microseconds more; on a serving engine the cost was not measurable.
  • New: VF_SAFE=1, one switch for the conservative paths. In libcuda.so.1, the nvJitLink adapter, vf ptxas, vf adapt, the launcher and the bf16 cuBLAS variants, it turns off what the layer does by choice and whose results are not bit-identical to the default's, whatever their own variables say: VF_BF16_TC_GROUPS=1, VF_BF16_TC_TILES=1, VF_BF16_COLUMN=tree, VF_BF16_ROW=tree, VF_TRANSLATE=first and force, the tensor-core path of the bf16 cuBLAS variants, and the pairs of fp16 tensor-core products in translated sm_75 machine code, which are on by default and whose last bits depend on a kernel's registers. A line says what it turned off, and vf doctor says it too. It does not change the capability that a program is told. Measured on one V100: Triton's fp16 GEMMs told 8.0 and cuBLAS's ran at the same speed with it as without, while PyTorch's fp16 attention (scaled_dot_product_attention, sm_75 machine code whose products pair) took 5.24 ms a call instead of 2.80. Only the exact value 1 turns it on.
  • bf16 cuBLAS variants (still opt-in): a gate on k, and safe mode. With VF_CUBLAS_BF16_TC=1, the tensor-core path now takes only products with k from 1024 to 16384; a product with a smaller k goes to the skinny path when its rule takes it, else to cuBLAS 12.9 as it is. VF_SAFE=1 turns the path off, and every result is then cuBLAS 12.9's bits. An acceptance test, bf16-accept in tests/gpu/forward-bf16.sh, checks the calls that the path serves against the exact product and that nothing under the gate is served. The inference gains measured for 0.1.4 (1.3 to 1.7 times as fast in eager PyTorch, up to 1.9 times under torch.compile) were measured on models whose layers are 768 or 896 wide: with the gate, all their products but the second of each MLP go to the skinny path or to cuBLAS 12.9, so those gains no longer apply. They were not measured again (measurements). The path still makes bf16 training slower.
  • Logs. VF_SUMMARY=FILE also writes the report at exit (the kernels with emulated instructions, the second translations, the counts of VF_STATS) to FILE.PID, and rewrites it every 30 s while it changes (VF_SUMMARY_INTERVAL), so that a process killed with SIGKILL leaves it. At VF_LOG_LEVEL=2, the lines about an image name it (its file, or its size and XXH64 digest for a load from memory), and each image adapted says how many of its kernels have a body that is a trap and nothing else and how many an empty body, with the first three names; vf adapt lists both. emulated in NAME and the refusal of a kernel are said once for each kernel and code, and a second kernel of the same name with other code is now said too. VF_PROFILE says the first synchronisation that fails at once, with the kernel it followed.
  • Building on newer systems. On Ubuntu 26.04 (glibc 2.43, GCC 15), the scripts and tests that compile CUDA sources with CUDA 12.9.2 failed: nvcc refuses GCC 15, and glibc 2.41 and later declare sinpi, cospi and rsqrt otherwise than CUDA 12's headers (issue #3). They now go through scripts/nvcc-host.sh, which adds a g++-N that the toolkit accepts and a header of the project only when a probe does not compile as it is; no hand edit of the toolkit is needed. Built so with GCC 14, the bf16 kernels and the translator's test kernels are the same bytes as on Ubuntu 24.04. A program's own nvcc of CUDA 12.9, 13.0 or 13.1 still fails there, with the layer or without.
  • For contributors. tests/release-check.sh runs the host checks of a release in order, with a table, and prints the GPU part. The GPU suites unset the layer's settings that they do not take from the caller (VF_CAPABILITY=8.0 VF_CAPABILITY_ALL=1 left in the shell made two cases of run.sh fail), and tests/gpu/run.sh has 200 cases (165 in 0.1.4). CONTRIBUTING.md is rewritten for contributors from outside the project, and docs/reports/ lists the test reports from other machines. The workspace declares the oldest Rust that builds it, 1.88 (1.95 is the oldest that was run).

Known limits. Told 7.5 (the default), Triton 3.8 still uses no tensor cores for tl.dot, whose float16 and bf16 products run 3 to 150 times slower than told 8.0; in a program with PyTorch, only VF_CAPABILITY=8.0 VF_CAPABILITY_ALL=1 changes that, and PyTorch's own attention is then refused. A kernel whose code is a trap is not recognised in an input of the driver's linker (cuLinkAddData) or of nvJitLink: launched from the linked image, it traps as without the layer. A kernel with an empty body is not refused: launched, it does nothing and returns no error, as without the layer (Strata 0.1.66's CUDA 13 build has such kernels; the engine did not ask for them in the runs measured). A refused kernel still traps when another kernel launches it, or when it is reached by an indirect call or through a call into another linker input. Under eager loading, PyTorch takes very long to start through the layer. Triton's machine code is validated on a corpus, not kernel by kernel, and the translation of sm_80 machine code is not independently validated. A lookup table asked for by name can be refused (error 801) once a kernel that the layer compiled alone holds a copy of it. See the limits and the full changelog.

Upgrading. The layer's cache (~/.cache/volta-forever/proxy, or VF_PROXY_CACHE) has a new format again, and a new build does not use the entries of the one before: the first start of each program after the upgrade adapts and translates its code again, as a first run does. For Strata split over several GPUs, give that first start STRATA_WATCHDOG_S=900 (Strata guide). The entries of 0.1.4 are removed as the cache reaches its size limit (2 GB by default), or remove the directory. With VF_CUBLAS_BF16_TC=1, products with k under 1024 now go to the skinny path or to cuBLAS 12.9 (above).

Inference engine guides and benchmarks · Installation