From f48ad1eb2011833d971d80e1121b46a6e002ffd5 Mon Sep 17 00:00:00 2001 From: Xu Zhao Date: Thu, 14 Nov 2024 12:21:12 -0800 Subject: [PATCH] Triton kernel requires TMA Summary: Fix a minor bug in fp8_gemm_rowwise where TMA is not available on AMD/HIP Reviewed By: nmacchioni Differential Revision: D65915379 fbshipit-source-id: de6effd2f7e830115eadaf17a4c1add2101ef78e --- tritonbench/operators/fp8_gemm_rowwise/operator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tritonbench/operators/fp8_gemm_rowwise/operator.py b/tritonbench/operators/fp8_gemm_rowwise/operator.py index d015ecae..ad8a0aa1 100644 --- a/tritonbench/operators/fp8_gemm_rowwise/operator.py +++ b/tritonbench/operators/fp8_gemm_rowwise/operator.py @@ -43,8 +43,11 @@ def parse_args(args: List[str]) -> argparse.Namespace: matmul_fp8_row as triton_fp8_row, ) + assert hasattr( + triton.runtime.driver.active.utils, "fill_1d_tma_descriptor" + ), "TMA is required by the Triton kernel." HAS_TRITON = True -except ImportError: +except (ImportError, AssertionError): HAS_TRITON = False