From 33e5d6732657aa6187007628096f9ee868103c78 Mon Sep 17 00:00:00 2001 From: biondizzle Date: Wed, 13 May 2026 23:28:03 +0000 Subject: [PATCH] Add CUTLASS_CHECK macro --- .../cutlass_nvfp4_gemm/cutlass_nvfp4_gemm.cu | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/nvfp4_megamoe_kernel/cutlass_nvfp4_gemm/cutlass_nvfp4_gemm.cu b/src/nvfp4_megamoe_kernel/cutlass_nvfp4_gemm/cutlass_nvfp4_gemm.cu index d559cda8..557efafd 100644 --- a/src/nvfp4_megamoe_kernel/cutlass_nvfp4_gemm/cutlass_nvfp4_gemm.cu +++ b/src/nvfp4_megamoe_kernel/cutlass_nvfp4_gemm/cutlass_nvfp4_gemm.cu @@ -22,6 +22,17 @@ #include #include +// CUTLASS_CHECK macro (not in headers, define our own) +#define CUTLASS_CHECK(status) \ + do { \ + cutlass::Status _s = status; \ + if (_s != cutlass::Status::kSuccess) { \ + fprintf(stderr, "CUTLASS error at %s:%d: %s\n", \ + __FILE__, __LINE__, cutlassGetStatusString(_s)); \ + return -1; \ + } \ + } while (0) + #if defined(CUTLASS_ARCH_MMA_SM100_SUPPORTED) using namespace cute;