CompileIQ matmul POC

An inference-only Triton FP16 matmul with GPU/shape-specific CompileIQ ACFs. matmul(a, b) accepts contiguous matrices on the same CUDA device, with A[M,K] @ B[K,N] and positive M/N/K divisible by 32/64/32.

Usage

For the original tested environment, install CUDA-enabled PyTorch 2.10.0, Triton 3.6.0, kernels>=0.17.1, and nvidia-cuda-nvcc==13.3.73. The exact PTXAS patch is not required; 13.3.33 also passed. On ARM64, install torch==2.10.0+cu130 from https://download.pytorch.org/whl/cu130; the plain PyPI wheel is CPU-only. Point both environment variables below at your installed PTXAS before starting Python:

export TRITON_PTXAS_PATH=/absolute/path/to/ptxas-13.3.73
export TRITON_PTXAS_BLACKWELL_PATH="$TRITON_PTXAS_PATH"
import torch
from kernels import get_kernel

kernel = get_kernel("sayakpaul/matmul-compileiq", version=0, trust_remote_code=True)
a = torch.rand((4096, 4096), device="cuda", dtype=torch.float16) - 0.5
b = torch.rand_like(a) - 0.5
c = kernel.matmul(a, b)
torch.testing.assert_close(c, a @ b, atol=1e-2, rtol=0)

For the pip-installed compiler, the binary is usually at <venv>/lib/python3.12/site-packages/nvidia/cu13/bin/ptxas (adjust the Python version to match the environment). No CompileIQ installation is needed to load this kernel.

Selection and portability

Four independently tuned ACFs are indexed by GPU model + (M,N,K): NVIDIA GB10 and NVIDIA A100-SXM4-80GB, each at 2048³ and 4096³. Compute capability is not a second lookup key. Tiles remain 32×64×32, four warps, three stages. Version 0 is an experimental POC.

Set both TRITON_PTXAS_PATH and TRITON_PTXAS_BLACKWELL_PATH to PTXAS 13.3 before importing Triton. CompileIQ is only used offline and is not a runtime dependency. The ACF is applied at JIT compilation, with normal Triton caching.

Each ACF records validated Torch/Triton/PTXAS major.minor tuples separately from its lookup key. Full tested versions are provenance, not exact patch restrictions. A100 ACFs also passed with Torch 2.11 / Triton 3.6 and the matched Torch 2.12.1 / Triton 3.7.1 pair. PTXAS 13.3.33 and 13.3.73 worked on both GPUs; 13.4.92 rejected the 13.3 ACFs. This is measured coverage, not a guarantee for every untested patch.

Unknown GPU names, shapes or release tuples warn and run the same kernel without controls, rather than raising a version mismatch error. COMPILEIQ_DISABLE_ACF=1 forces this baseline path. Checksums still detect corrupt packaged ACFs. CompileIQ is not needed at runtime.

See the source repository's portability report for the complete experiments and compatibility policy.

Measured ACF speedup

For the original GB10 4096³ configuration, the winning ACF reduced measured kernel latency by 0.765%, equivalent to a 1.0077× speedup or about 32 microseconds per 4096×4096 matmul.

Compilation of the same Triton kernel Median latency across validation rounds
PTXAS 13.3.73, without ACF 4.195341 ms
PTXAS 13.3.73, with the packaged ACF 4.163248 ms

The expanded matrix uses each GPU/shape's own winner:

GPU Shape Baseline ms ACF ms Reduction
GB10 2048³ 0.424253 0.420672 0.844%
GB10 4096³ 4.195341 4.163248 0.765%
A100-SXM4-80GB 2048³ 0.169126 0.162386 3.985%
A100-SXM4-80GB 4096³ 1.408592 1.375098 2.378%

Latency reduction is (baseline - ACF) / baseline; speedup is baseline / ACF. The comparison uses the same kernel, input shape, dtype, launch configuration and compiler. The baseline is this illustrative Triton matmul compiled without controls, rather than PyTorch/cuBLAS or another optimized GEMM implementation.

CompileIQ searched five generations and evaluated 136 candidates. We then remeasured the saved winner independently on September 22, 2026, using ten fresh input seeds and alternating baseline/ACF measurement order. Each round used triton.testing.do_bench with 100 ms warmup, 1000 ms measurement and mean latency reporting; the table gives the median of those ten round means. The ACF was faster in nine of ten rounds. Every tuned output matched the PyTorch reference exactly for these validation inputs.

These timings cover direct launches of the compiled kernel with preallocated output, excluding JIT compilation, output allocation and the packaged Torch operator's dispatch overhead. GPU clocks were unlocked and latency varied between rounds. The small measured gain is provisional and specific to the validated configuration; it does not establish an end-to-end speedup for kernel.matmul or a benefit on other hardware or software versions.

Licenses

The Python kernel code follows the repository's Apache-2.0 license. The binary ACF is a CompileIQ Software Output under the included NVIDIA license at controls/compileiq-license.txt. ACF output copyright: © NVIDIA Corporation, 2026.

Downloads last month
-
other
Supported hardwares new
CUDA
all
GPU
B300
288GB
NVIDIA SXM
B200
192GB
NVIDIA SXM
H200
141GB
NVIDIA SXM
H100
80GB
GPU
H800
80GB
GPU
H20
96GB
GPU
L40s
48GB
GPU
L40
48GB
GPU
L20
48GB
GPU
L4
24GB
DGX Spark
GB10
128GB
GPU
RTX PRO 6000 WS
96GB
GPU
RTX PRO 6000 Max-Q
96GB
GPU
RTX PRO 5000
48GB
GPU
RTX PRO 4500 WS
32GB
GPU
RTX PRO 4000
24GB
GPU
RTX PRO 4000 SFF
24GB
GPU
RTX PRO 2000
16GB
GPU
RTX 6000 Ada
48GB
GPU
RTX 5880 Ada
48GB
RTX
RTX 5000 Ada
32GB
GPU
RTX 4500 Ada
24GB
RTX
RTX 4000 Ada
20GB
RTX
RTX 4000 SFF Ada
20GB
GPU
RTX 3500 Ada Mobile
12GB
GPU
RTX 2000 Ada
16GB
GPU
RTX A6000
48GB
GPU
RTX A5000
8GB
GPU
RTX A5000 Max-Q
16GB
GPU
RTX A5000 Mobile
16GB
GPU
RTX A4000
16GB
GPU
RTX A4000 Max-Q
8GB
GPU
RTX A4000 Mobile
8GB
GPU
RTX A3000 Mobile
6GB
GPU
RTX A2000
6GB
GPU
RTX A2000 Embedded
4GB
GPU
RTX A2000 Max-Q
4GB
GPU
RTX A2000 Mobile
4GB
GPU
A800
40GB
GPU
A100
80GB
GPU
A40
48GB
GPU
A30
24GB
GPU
A10
24GB
GPU
A2
16GB
RTX
RTX 5090
32GB
RTX
RTX 5090 D
32GB
RTX
RTX 5090 Mobile
24GB
RTX
RTX 5080
16GB
RTX
RTX 5080 Mobile
16GB
RTX
RTX 5070
12GB
RTX
RTX 5070 Mobile
8GB
RTX
RTX 5070 Ti
16GB
RTX
RTX 5070 Ti Mobile
12GB
RTX
RTX 5060 Ti
16GB
RTX
RTX 5060
8GB
RTX
RTX 5060 Mobile
8GB
RTX
RTX 5050
8GB
RTX
RTX 5050 Mobile
8GB
RTX
RTX 4090
24GB
RTX
RTX 4090D
24GB
RTX
RTX 4090 Mobile
16GB
RTX
RTX 4080 SUPER
16GB
RTX
RTX 4080
16GB
RTX
RTX 4080 Mobile
12GB
RTX
RTX 4070
12GB
RTX
RTX 4070 Mobile
8GB
RTX
RTX 4070 Ti
12GB
RTX
RTX 4070 Super
12GB
RTX
RTX 4070 Ti Super
16GB
RTX
RTX 4060
8GB
RTX
RTX 4060 Ti
8GB
RTX
RTX 4090 Laptop
16GB
RTX
RTX 4080 Laptop
12GB
RTX
RTX 4070 Laptop
8GB
RTX
RTX 4060 Laptop
8GB
RTX
RTX 4050 Laptop
6GB
RTX
RTX 3090
24GB
RTX
RTX 3090 Ti
24GB
RTX
RTX 3080
12GB
RTX
RTX 3080 Ti
12GB
RTX
RTX 3080 Mobile
16GB
RTX
RTX 3070
8GB
RTX
RTX 3070 Ti
8GB
RTX
RTX 3070 Ti Mobile
8GB
RTX
RTX 3060 Ti
8GB
RTX
RTX 3060
12GB
GPU
RTX 2080 Ti
11GB
GPU
RTX 2080
8GB
GPU
RTX 2070
8GB
GPU
RTX 2070 SUPER Mobile
8GB
GPU
RTX 2070 SUPER
8GB
RTX
RTX 3060 Mobile
6GB
RTX
RTX 3050 Mobile
4GB
GPU
RTX 2060
6GB
GPU
RTX 2060 12GB
12GB
GPU
RTX 2060 Mobile
6GB
GPU
RTX 2050 Mobile
4GB
GPU
GTX 1080 Ti
11GB
GPU
GTX 1080
8GB
GPU
GTX 1070 Ti
8GB
GPU
GTX 1070
8GB
GPU
GTX 1060
3GB
GPU
GTX 1050 Ti
4GB
GPU
RTX Titan
24GB
GPU
GTX 1660
6GB
GPU
GTX 1650 Mobile
4GB
NVIDIA T4
T4
16GB
GPU
T10
16GB
GPU
V100
32GB
GPU
Quadro P6000
24GB
GPU
P40
24GB
GPU
P100
16GB
Jetson
Jetson AGX Orin 64GB
64GB
Jetson
Jetson AGX Orin 32GB
32GB
Jetson
Jetson Orin NX 16GB
16GB
Jetson
Jetson Orin NX 8GB
8GB
Jetson
Jetson Orin Nano 8GB
8GB
Jetson
Jetson Orin Nano 4GB
4GB
Jetson
Jetson AGX Xavier
32GB
Jetson
Jetson Xavier NX
8GB
Jetson
Jetson TX2
4GB
Jetson
Jetson Nano
4GB