{"id":1966,"date":"2026-07-18T06:28:21","date_gmt":"2026-07-18T13:28:21","guid":{"rendered":"http:\/\/macdaddy4sure.ai\/?p=1966"},"modified":"2026-07-18T06:28:21","modified_gmt":"2026-07-18T13:28:21","slug":"cutlass-cute-facade-cublas-tf32","status":"publish","type":"post","link":"http:\/\/macdaddy4sure.ai\/index.php\/2026\/07\/18\/cutlass-cute-facade-cublas-tf32\/","title":{"rendered":"CUTLASS \/ CuTe fa\u00e7ade + cuBLAS TF32"},"content":{"rendered":"\n<p>CutlassAccel is the GPU linear-algebra entry for MathNN-sized work.<\/p>\n\n\n\n<p><strong>Full TF32 \/ matmul guide:<\/strong> TF32MatrixMultiply.md (TF32MatrixMultiply.md)<\/p>\n\n\n\n<p><strong>Lua bindings:<\/strong> LuaBrainstormAPI.md (LuaBrainstormAPI.md)<\/p>\n\n\n\n<p><strong>Chat feature index:<\/strong> ChatSession-Features.md (ChatSession-Features.md)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Status<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Mode<\/strong><\/td><td><strong>Behavior<\/strong><\/td><\/tr><tr><td><strong>Default GPU (`USE_CUDA`)<\/strong><\/td><td><strong>cuBLAS `GemmEx`<\/strong> \u2014 FP32 or <strong>TF32<\/strong> (CUBLAS_COMPUTE_32F_FAST_TF32, SM\u22658)<\/td><\/tr><tr><td><strong>No GPU \/ cuBLAS fail<\/strong><\/td><td>Host MatrixAcceleration AVX\/AVX-512 GEMM<\/td><\/tr><tr><td><strong>`AI_USE_CUTLASS` + device .cu<\/strong><\/td><td>Optional future MMA kernels (same API)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>GPU MathNNDevice::MatMul calls _CutlassAccel::Gemm first.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Commands<\/h2>\n\n\n\n<p><em>[text]<br><\/em>cutlass status<br>cutlass bench [size] [repeats]<br>cutlass check [size]<br>cutlass set precision fp32|tf32|fp16|bf16<br>cutlass gemm [M N K]<\/p>\n\n\n\n<p>Alias: cute \u2026.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">API<\/h2>\n\n\n\n<p><em>[cpp]<br><\/em>_CutlassAccel::Gemm(A, B, C, M, N, K, detail);<br>_CutlassAccel::LinearFused(W, x, bias, y, batch, in, out, relu, detail);<br>_CutlassAccel::SetPrecision(Precision::Tf32);<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Lua<\/h2>\n\n\n\n<p><em>[lua]<br><\/em>cutlass_set_precision(&#8220;tf32&#8221;)<br>cutlass_gemm(128, 128, 128)<br>cutlass_check(64)<br>cutlass_bench(256, 3)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Correctness<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>cutlass check: host golden vs fa\u00e7ade; FP32 tol ~1e-3; TF32 probe tol ~5e-2.\u00a0<\/li>\n\n\n\n<li>Detail strings report cublas_tf32, cublas_fp32, or host fallback.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Next steps for real CUTLASS MMA<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Add CutlassGemm.cu including CUTLASS\/CuTe headers.\u00a0<\/li>\n\n\n\n<li>Define AI_USE_CUTLASS on Tensor or a GPU config.\u00a0<\/li>\n\n\n\n<li>Keep the same Gemm API; leave cuBLAS as default path.\u00a0<\/li>\n\n\n\n<li>Keep cutlass check as golden vs AVX.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>CutlassAccel is the GPU linear-algebra entry for MathNN-sized work. Full TF32 \/ matmul guide: TF32MatrixMultiply.md (TF32MatrixMultiply.md) Lua bindings: LuaBrainstormAPI.md (LuaBrainstormAPI.md) Chat feature index: ChatSession-Features.md (ChatSession-Features.md) Status Mode Behavior Default GPU (`USE_CUDA`) cuBLAS `GemmEx` \u2014 FP32 or TF32 (CUBLAS_COMPUTE_32F_FAST_TF32, SM\u22658) No GPU \/ cuBLAS fail Host MatrixAcceleration AVX\/AVX-512 GEMM `AI_USE_CUTLASS` + device .cu Optional future MMA [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1966","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/posts\/1966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/comments?post=1966"}],"version-history":[{"count":1,"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/posts\/1966\/revisions"}],"predecessor-version":[{"id":1967,"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/posts\/1966\/revisions\/1967"}],"wp:attachment":[{"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/media?parent=1966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/categories?post=1966"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/tags?post=1966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}