SCALE 1.8 Released

Chris Kitching
Mon Nov 30 2026
SCALE 1.8 is out. Let's take a moment to explore some of the most exciting features in this release.
HIP Support
SCALE now supports HIP as an input language, allowing software written in HIP or CUDA to be compiled for either AMD or NVIDIA GPUs.
The only difference between how we treat HIP and CUDA is in language and library semantics quirks. In all other respects, both languages get the same treatment:
- Uses our runtime library for AMD GPUs, and NVIDIA's for their GPUs.
- Matching semantics of the vendor-provided compiler (
hipcc). - Uses our compiler, offering all the usual unique tricks.
There are many interesting consequences of this work:
- First-class NVIDIA support for HIP projects in SCALE.
- AMD users may see performance improvements vs. the vendor-provided toolchain.
- Users may cherry-pick the implementation that has the best properties for the hardware they want to run on.
- HIP and CUDA files may be mixed in a single project (and linked together). Since SCALE uses the same runtime library for both input languages, you can freely mix-and-match within a hardware vendor. Got some kernels in HIP that work fine on both vendors, but want to add in some NVIDIA-specific CUDA ones in another file? That just works.
This is a step towards our vision of a truly language-and-vendor-agnostic accelerated compute platform. Centralising the platform work in this way means that gains for one target apply to others, reducing repeated work and improving outcomes for everyone.
Not all AMD-backend-specific features are yet rendered portable by this work. Many AMD-specific builtins (eg. DPP) are mapped to our target-independent representations and work across vendors, but not all.
Speedups for cuBLAS/cuSOLVER/...
SCALE previously implemented these APIs for AMD targets by wrapping AMD's libraries (rocBLAS, rocSOLVER, etc.).
This approach works and was easy to implement, but has serious downsides:
- These
roc*libraries are built on HIP, using the HIP runtime. This meant we had to ship the entire HIP runtime and all its dependencies just to support these libraries. - The HIP runtime is distinct from the SCALE runtime and has subtly different semantics. Calls into these libraries therefore had to synchronise HIP/CUDA streams and memory allocations, causing slowdowns.
- A variety of horrible static initialisation/deinitialisation problems.
Now that SCALE can compile HIP as an input language, we have transitioned to recompiling those libraries with our compiler and toolchain. That means:
- These libraries benefit from our novel compiler work.
- The performance overhead of synchronising the HIP and SCALE runtimes is gone.
- No longer shipping the HIP runtime.
- CUDA graph records that use these libraries now work (since the kernel calls etc. within them are visible to the SCALE runtime).
The smallest speedup measured from this work is around 10 μs per API call. In many cases, it is far higher.
Host dialect emulation
NVIDIA's nvcc compiler builds the host side of CUDA translation units by passing them to the chosen host compiler. As a result, every CUDA file is effectively written in two languages at once:
- The host code is written for the quirks of the chosen host compiler.
- The device code is written for the quirks of NVIDIA's proprietary device compiler.
SCALE has previously been pretty good at emulating NVIDIA's device compiler, but always built host code like
clang would. Although clang does some work to support gcc quirks, this isn't always good enough.
With SCALE 1.8, we use the nvcc host compiler selection flags to determine which host compiler the user wants us
to pretend to be, and do that. Currently, we support GCC, clang, MSVC, and PGI.
This allows us to retain the benefits of building everything within a single compiler (eg. cross-side optimisation),
while gaining the compatibility advantages of NVIDIA nvcc's approach.
Improved cross-side optimisation
One of our compiler's most exciting features is the ability to optimise between the host and device halves of a CUDA translation unit. There is often useful information available in the host code (constant block sizes, aliasing info, etc.) which could be used for optimising the device code, but NVIDIA's compiler is unable to make use of this information due to the requirement to textually separate the host and device code (meaning the two halves are built in separate processes).
This release includes three major improvements to this feature:
- It now works for NVIDIA targets.
- The optimisations can be applied to more kernels than previously.
- Alias-analysis results can now be propagated from host into device code.
Of the ~27,000 CUDA kernels found in PyTorch, llama.cpp, CUTLASS, CV-CUDA, MAGMA, Ginkgo, xgboost, OpenCV, HeCBench, GROMACS, LAMMPS, faiss, tiny-cuda-nn, flashinfer and GPUJPEG, SCALE 1.8 is able to prove the safety of performing cross-side optimisation on 63%, up from 15% in the previous release.
Example: PyTorch
PyTorch's kernels use a CUDA_KERNEL_ASSERT macro to perform sanity checks (even in release builds). SCALE is now able to
statically prove some of these assertions are true.
PyTorch's nll_loss_forward_reduce_cuda_kernel_1d kernel begins like this:
// aten/src/ATen/native/cuda/Loss.cu
template <typename scalar_t, typename index_t>
__global__ void nll_loss_forward_reduce_cuda_kernel_1d(scalar_t* output, ..., int64_t ignore_index) {
CUDA_KERNEL_ASSERT(threadIdx.x == 0 && threadIdx.y == 0 && threadIdx.z == 0);
const index_t t = *target;
...
Since the only launch looks like:
nll_loss_forward_reduce_cuda_kernel_1d<scalar_t, index_t>
<<<1, 1, 0, at::cuda::getCurrentCUDAStream()>>>(...);
The constant block dimensions are propagated into the kernel and the assertion disappears, taking about half of the kernel's instructions with it.
Example: llama.cpp
In llama.cpp's rotary embedding code, the rope_norm kernel has this code:
// ggml/src/ggml-cuda/rope.cu
template <bool forward, bool has_ff, typename T, typename D>
static __global__ void rope_norm(const T * x, D * dst, const int ne00, ...) {
const int i0 = 2*(blockDim.y*blockIdx.y + threadIdx.y);
...
const int row_dst = blockDim.x*blockIdx.x + threadIdx.x;
const uint32_t i3 = row_dst / (ne01 * ne02);
const uint32_t i2 = (row_dst - i3 * ne01 * ne02) / ne01;
...
The host code that launches it looks like:
const dim3 block_dims(1, CUDA_ROPE_BLOCK_SIZE, 1); // 1 x 256 x 1
rope_norm<forward, false><<<block_nums, block_dims, 0, stream>>>(...);
Constant-propagating the block size across leads to some big wins:
- blockIdx.x is proven to be 0, threadIdx.x is zero, and much of the arithmetic evaporates.
- The divisions become uniform, no longer needing to be computed in every lane (eg. on AMD they use
s_mul_hi_u32instead ofv_mul_hi_u32).
This translates to a ~18% runtime speedup for this kernel.
Example: CV-CUDA
This work can improve shared memory usage, too. CV-CUDA's SIFT operator's extrema search keeps a 3 x 3 matrix and two vectors per thread, and is always launched with 128 threads per block. It looks like this:
// src/cvcuda/priv/OpSIFT.cu, in an anonymous namespace
template<int BW, int BH, typename DT>
__global__ void DoFindExtrema(...)
{
cuda::math::Vector<float, 3> dD, sol; // derivative distances and solver solution
cuda::math::Matrix<float, 3, 3> H; // Hessian matrix
...
The AMD back end promotes small per-thread arrays to shared memory, to avoid spilling them to even-slower stack memory. This requires per-thread shared memory. Proving the block size reduces the size of this allocation from 61,440 to 7680 bytes for this kernel, since the number of instances of the per-thread variable is bounded to a smaller value. This transform alone yields a ~4x speedup on this kernel, due to a mixture of faster launch time and greater occupancy.
Matrix Core Support
Building on our earlier work around shuffle and cross-side optimisation, SCALE is now able to compile mma instructions
found in inline PTX asm to use AMD's MFMA (CDNA) and WMMA (RDNA4) hardware instructions.
Many matmul kernels now give reasonable performance out of the box, and may be written in a portable fashion
for both vendors. When that isn't good enough, our family of target-independent matrix core intrinsics give you
the tools needed to tune things without having to resort to target-specific asm at all.
This release also brings improvements to the compiler's ability to use dot-product instructions when compiling arithmetic.
This means PTX dp4a and corresponding similar hardware instructions on AMD devices are automatically
used to handle equivalent code sequences, leading to performance improvements on some kernels. The results are particularly
impactful for short-integer matrix multiply code on devices with weak-or-nonexistent integer matrix cores (eg. AMD gfx11).
Profiler
SCALE has a profiler now.
scaleprof can do things including:
- Plot a timeline of every host thread and GPU stream.
- Sample performance counters over time, giving insight into what's going on in a kernel.
- Detect implicit synchronisation points that are hurting performance. The CUDA API has many rules about when APIs must implicitly synchronise the GPU, making it relatively easy to accidentally stall.

Timeline showing CPU thread API activity, memory consumption, the activity of each CUDA stream, and hardware counter samples.

Arrows connect API calls to the kernels they launch or synchronise with, and show the dependencies between the nodes of a CUDA graph.
scaleprof outputs data in the standard Perfetto format, and offers a machine-friendly
SQL interface to the trace files via extensions to the standard Perfetto tooling. This means:
- The standard Perfetto UI can be used to consume the results.
- Coding agents can "ask questions" using SQL queries, allowing them to use the data far more effectively than if it were in a proprietary binary format. This means faster iteration and less token burn when optimising kernels.
The SCALE profiler doesn't care which language you wrote your code in (HIP/CUDA), though is currently only supported for AMD GPUs. For NVIDIA GPUs, NVIDIA's own profilers may be used regardless of your source language.
Optimiser remarks
The compiler's optimiser can now give more specific information about what's going on during optimisation.
For some time, LLVM has had optimiser remarks, providing some insight into what the optimiser is doing.
SCALE builds on this by adding a number of GPU-specific remarks, such as:
- Why
mmacode failed to use the matrix hardware when building for AMD, and what you might be able to do about it. - When/why a stack variable is being used for a reason other than register exhaustion. Such cases can usually be fixed by adjusting your code so memory-to-register promotion is possible.
- Information about why cross-side optimisation failed to propagate useful information about the block dimensions or pointer-typed arguments of a kernel.
These can save a great deal of time by detecting performance problems before you've even run the code.
The most time-consuming step of an agentic kernel optimisation loop is often the time spent running the benchmarks, not the agent itself. So: tooling that allows better results to be reached with fewer iterations means large time/compute savings, better outcomes, and fewer tokens consumed.
If we can spot the problem upfront, bother building/running the program, disassembling it, and then wading through the machine code to find it?
CUDA API Coverage
Since 1.7, our API coverage has increased enormously. We now publish reports of our CUDA API coverage status against every version of the CUDA API back to 8.0 (circa 2016), and allow you to specify which version of the CUDA API you want to build against. SCALE ships every version of every supported function.
This means that even projects which don't support the newest version of the CUDA API may be used with SCALE: just set the API version to what works. Since the old APIs are built on the same underlying machinery as everything else, they benefit from ongoing work: you aren't stuck using an ancient compiler/library just because you need an API from CUDA 8. Migrate to the newer API when you actually want something it adds, not because something you need got deleted.
We have no plans to ever remove any of the deprecated APIs we support: our implementation strategy means there is no real upside to doing so.
CUDA 13 API by Default
Our coverage of the new APIs in CUDA 13 is now mature enough that we've decided to bump the default CUDA version to 13.0.
This isn't really a breaking change: SCALE allows users to select their desired CUDA API version either with the
SCALE_CUDA_VERSION environment variable, or by setting the __SCALE_CUDA_VER_{MAJOR|MINOR}__ macros.
One notable consequence of this is that the compiler sets the --static-global-template-stub and --device-entity-has-hidden-visibility
flags by default, allowing cross-side optimisation to apply in more cases (among other things).
Since API and compiler features are largely orthogonal, these new compiler features may be opted-into even by projects which use an older version of the runtime/driver APIs.
Looking ahead
This post just scratches the surface of what we've been up to over the past few months. There are too many smaller items, performance gains, and bug fixes to fit into a blog post (our changelogs cover some of them).
As SCALE matures, our focus shifts from compatibility to performance. We're reaching the point where most projects work out of the box, and the majority of the issues we work on are of the form "X is slow" vs. "X does not work". That's a drastic change from a year ago.
We're not slowing down, and have much more in-flight that we're excited to share in the coming weeks/months.
Get SCALE and try for yourself.