From 51935551fbaf9dca72339d66b84e5e17850ad3e7 Mon Sep 17 00:00:00 2001 From: Tri Dao Date: Wed, 4 Feb 2026 21:18:46 +0700 Subject: [PATCH] [CuTeDSL] Add sub_packed_f32x2 operation Add subtraction operation for packed f32x2 values, following the same pattern as the existing add_packed_f32x2 and mul_packed_f32x2 operations. Co-Authored-By: Claude Opus 4.5 --- python/CuTeDSL/cutlass/cute/arch/__init__.py | 1 + python/CuTeDSL/cutlass/cute/arch/nvvm_wrappers.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/python/CuTeDSL/cutlass/cute/arch/__init__.py b/python/CuTeDSL/cutlass/cute/arch/__init__.py index 0cda0a96..5213b00e 100644 --- a/python/CuTeDSL/cutlass/cute/arch/__init__.py +++ b/python/CuTeDSL/cutlass/cute/arch/__init__.py @@ -96,6 +96,7 @@ __all__ = [ "fma_packed_f32x2", "mul_packed_f32x2", "add_packed_f32x2", + "sub_packed_f32x2", "fmax", "rcp_approx", "exp2", diff --git a/python/CuTeDSL/cutlass/cute/arch/nvvm_wrappers.py b/python/CuTeDSL/cutlass/cute/arch/nvvm_wrappers.py index 69f4477d..5aaba6ce 100644 --- a/python/CuTeDSL/cutlass/cute/arch/nvvm_wrappers.py +++ b/python/CuTeDSL/cutlass/cute/arch/nvvm_wrappers.py @@ -940,6 +940,9 @@ mul_packed_f32x2 = partial( add_packed_f32x2 = partial( calc_packed_f32x2_op, src_c=None, calc_func=nvvm.add_packed_f32x2 ) +sub_packed_f32x2 = partial( + calc_packed_f32x2_op, src_c=None, calc_func=nvvm.sub_packed_f32x2 +) @dsl_user_op