Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
61b700e
Build: CUTLASS - add SM100/SM103 UMMA kernel patterns and fix version…
Apr 17, 2026
e184681
Microbenchmark: gemm-flops - fix SM100/SM103 kernel map and output pa…
Apr 17, 2026
202c36a
Test: gemm-flops - add SM100/SM103 unit test for UMMA kernel output p…
Apr 17, 2026
401125a
Build: CUTLASS - upgrade from v4.1.0 to v4.3.5 for CUDA >= 12.9 (Blac…
Apr 17, 2026
6939c6b
Build: CUTLASS - refactor CUTLASS_LIBRARY_KERNELS to be per-architecture
Apr 18, 2026
81236c2
feat: add fp8_tc precision to gemm-flops benchmark base
Apr 18, 2026
c0b61c7
feat: add fp8_tc kernel patterns for SM90 and SM100 in gemm-flops
Apr 18, 2026
bac7829
build: add FP8 (e4m3) CUTLASS kernel patterns to Makefile
Apr 18, 2026
3fd5055
test: add FP8 (e4m3) parsing tests for SM90 and SM100 gemm-flops
Apr 18, 2026
af429e2
fix: restore SM80 legacy kernel patterns in CUDA >= 12.8 Makefile path
Apr 18, 2026
95f79cf
fix: correct test setup for SM100 and FP8 gemm-flops tests
Apr 18, 2026
f44d959
fix: wrap long comment to pass flake8 E501 line length check
Apr 20, 2026
67ecd9f
Fix CUTLASS v4.3.5 build failure for Blackwell SM100/SM103 and refact…
Apr 20, 2026
907ac43
Fix aarch64 linker overflow in CUTLASS FP8 kernel shared libraries
Apr 21, 2026
1cc4d89
Fix CUTLASS aarch64 build and add FP4 benchmark support
Apr 23, 2026
5ceefe1
Optimize CUTLASS kernel selection for peak-FLOPS benchmarking
Apr 24, 2026
1cd982a
Fix INT8/FP8 kernel patterns for Blackwell profiling
Apr 24, 2026
1128112
Add /opt/superbench/lib to LD_LIBRARY_PATH in Dockerfile
Apr 24, 2026
a909e8e
Fix INT8 handling: skip on SM103a (GB300), keep on SM100a (GB200)
Apr 24, 2026
f2b370a
Replace mixed FP4 with true NVFP4 (block-scaled) for GB300
Apr 27, 2026
fb2a65c
Merge branch 'main' into dev/hongtaozhang/fix-gemm-flops-blackwell-sm100
Oct 14, 2026
2bb72e8
Build: CUTLASS - move CUDA 13.4 (SM107) to its own top-level tier in …
Oct 14, 2026
6876cc4
Fix NVFP4 kernel patterns to match CUTLASS v4.3.5 names (f32_void_f32)
Oct 14, 2026
8ed5aa6
Build: CUTLASS - upgrade CUDA 13.4 tier to v4.8.0 with a separate Rub…
Oct 15, 2026
c7e049c
Build: CUTLASS - fix CUDA < 11.8, H100 FP8 and CUDA 12.8 kernel builds
Oct 15, 2026
e1fba21
Build: CUTLASS - generate GB300 NVFP4 Ultra kernels with CUDA 12.9
Oct 15, 2026
a15dcc2
Benchmarks: Micro benchmark - add MXFP8, MXFP4 and UE5M3 NVFP4 to gem…
Oct 15, 2026
8af7715
Merge branch 'main' into dev/hongtaozhang/fix-gemm-flops-blackwell-sm100
polarG Nov 24, 2026
20ac8ff
Benchmarks: Fix Rubin CUTLASS GEMM execution
polarG Nov 24, 2026
831965b
Benchmarks: Upgrade Rubin CUTLASS build to 4.8.1
polarG Nov 24, 2026
684c0c9
Benchmarks: Address gemm-flops review comments
Dec 1, 2026
dfe0543
Merge branch 'main' into dev/hongtaozhang/fix-gemm-flops-blackwell-sm100
polarG Dec 1, 2026
f368a34
Benchmarks: Verify CUTLASS tag commits and fix yapf format
Dec 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dockerfile/cuda13.0.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ RUN cd /tmp && \
make install

ENV PATH="${PATH}" \
LD_LIBRARY_PATH="/usr/local/lib:/usr/local/mpi/lib:${LD_LIBRARY_PATH}" \
LD_LIBRARY_PATH="/usr/local/lib:/usr/local/mpi/lib:/opt/superbench/lib:${LD_LIBRARY_PATH}" \
SB_HOME=/opt/superbench \
SB_MICRO_PATH=/opt/superbench \
ANSIBLE_DEPRECATION_WARNINGS=FALSE \
Expand Down
4 changes: 3 additions & 1 deletion dockerfile/cuda13.4.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ FROM nvcr.io/nvidia/pytorch:26.09-py3
# - This machine is aarch64 (ARM). cpu_hpl, Intel MLC, AOCC and AMD BLIS auto-skip on aarch64.
# - CUDA 13.4 builds the in-tree CUDA benchmarks, CUTLASS, NVBench,
# cuBLASLt and NCCL tests for sm_107.
# - CUTLASS v4.8.1 is installed twice: GB200/GB300 into ${SB_MICRO_PATH}/{bin,lib}
# and Rubin (sm_107a) into ${SB_MICRO_PATH}/cutlass_sm107/{bin,lib}.
# - streamOlympus is built with GCC 15 in the stream-olympus-builder stage above.
#
# Build (from repo root), e.g.:
Expand Down Expand Up @@ -170,7 +172,7 @@ RUN if [ "$TARGETARCH" = "amd64" ]; then \
# Add the base image's HPC-X 2.51 UCX and ompi to the library path and add mpicc to PATH.
ENV MPI_HOME=/opt/hpcx/ompi
ENV PATH="/opt/hpcx/ompi/bin:${PATH}" \
LD_LIBRARY_PATH="/opt/hpcx/ucx/lib:/opt/hpcx/ompi/lib:${LD_LIBRARY_PATH}" \
LD_LIBRARY_PATH="/opt/hpcx/ucx/lib:/opt/hpcx/ompi/lib:/opt/superbench/lib:${LD_LIBRARY_PATH}" \
SB_HOME=/opt/superbench \
SB_MICRO_PATH=/opt/superbench \
ANSIBLE_DEPRECATION_WARNINGS=FALSE \
Expand Down
47 changes: 31 additions & 16 deletions docs/user-tutorial/benchmarks/micro-benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,41 @@ which is defined as the time range from the beginning of the launch API call to
#### Introduction

Measure the GPU GEMM FLOPS for different float and int data types, with or without Tensor Core (XDLOPS),
performed by NVIDIA [cutlass](https://github.com/NVIDIA/cutlass/tree/ccb697bac77fcc898e9c897b2c90aa5b60ac72fb)
performed by NVIDIA [CUTLASS](https://github.com/NVIDIA/cutlass)
or AMD [rocblas-bench](https://github.com/ROCmSoftwarePlatform/rocBLAS/tree/develop/clients/benchmarks).

Available precisions depend on the GPU architecture and the installed CUTLASS build. Vera Rubin (compute capability 10.7)
requires CUDA 13.4 or later and the repository-managed CUTLASS build, including its MXFP8 runtime datatype fix.
The benchmark automatically selects the dedicated `cutlass_sm107` profiler and its matching libraries on Rubin.
Precisions without kernels in the installed CUTLASS kernel list (`share/cutlass/generated_kernels.txt` next to the
profiler's `bin` folder) are skipped with a warning.

Block-scaled modes (`nvfp4_tc`, `nvfp4_ue5m3_tc`, `mxfp8_tc`, and `mxfp4_tc`) disable CUTLASS verification during throughput
measurement to avoid running a CPU reference GEMM for every selected kernel at the default matrix size.
Run correctness checks separately with small matrices and `--verification-enabled=true` using the matching CUTLASS profiler.

#### Metrics

| Name | Unit | Description |
|------------------------------|----------------|---------------------------------------------------------|
| gemm-flops/fp64_flops | FLOPS (GFLOPS) | GEMM float64 peak FLOPS. |
| gemm-flops/fp32_flops | FLOPS (GFLOPS) | GEMM float32 peak FLOPS. |
| gemm-flops/fp16_flops | FLOPS (GFLOPS) | GEMM float16 peak FLOPS. |
| gemm-flops/fp64_tc_flops | FLOPS (GFLOPS) | GEMM float64 peak FLOPS with NVIDIA Tensor Core. |
| gemm-flops/tf32_tc_flops | FLOPS (GFLOPS) | GEMM tensor-float32 peak FLOPS with NVIDIA Tensor Core. |
| gemm-flops/fp16_tc_flops | FLOPS (GFLOPS) | GEMM float16 peak FLOPS with NVIDIA Tensor Core. |
| gemm-flops/bf16_tc_flops | FLOPS (GFLOPS) | GEMM bfloat16 peak FLOPS with NVIDIA Tensor Core. |
| gemm-flops/int8_tc_iops | IOPS (GIOPS) | GEMM int8 peak IOPS with NVIDIA Tensor Core. |
| gemm-flops/int4_tc_iops | IOPS (GIOPS) | GEMM int4 peak IOPS with NVIDIA Tensor Core. |
| gemm-flops/fp32_xdlops_flops | FLOPS (GFLOPS) | GEMM tensor-float32 peak FLOPS with AMD XDLOPS. |
| gemm-flops/fp16_xdlops_flops | FLOPS (GFLOPS) | GEMM float16 peak FLOPS with AMD XDLOPS. |
| gemm-flops/bf16_xdlops_flops | FLOPS (GFLOPS) | GEMM bfloat16 peak FLOPS with AMD XDLOPS. |
| gemm-flops/int8_xdlops_iops | IOPS (GIOPS) | GEMM int8 peak IOPS with AMD XDLOPS. |
| Name | Unit | Description |
|---------------------------------|----------------|----------------------------------------------------------------------------------|
| gemm-flops/fp64_flops | FLOPS (GFLOPS) | GEMM float64 peak FLOPS. |
| gemm-flops/fp32_flops | FLOPS (GFLOPS) | GEMM float32 peak FLOPS. |
| gemm-flops/fp16_flops | FLOPS (GFLOPS) | GEMM float16 peak FLOPS. |
| gemm-flops/fp64_tc_flops | FLOPS (GFLOPS) | GEMM float64 peak FLOPS with NVIDIA Tensor Core. |
| gemm-flops/tf32_tc_flops | FLOPS (GFLOPS) | GEMM tensor-float32 peak FLOPS with NVIDIA Tensor Core. |
| gemm-flops/fp16_tc_flops | FLOPS (GFLOPS) | GEMM float16 peak FLOPS with NVIDIA Tensor Core. |
| gemm-flops/bf16_tc_flops | FLOPS (GFLOPS) | GEMM bfloat16 peak FLOPS with NVIDIA Tensor Core. |
| gemm-flops/int8_tc_iops | IOPS (GIOPS) | GEMM int8 peak IOPS with NVIDIA Tensor Core. |
| gemm-flops/int4_tc_iops | IOPS (GIOPS) | GEMM int4 peak IOPS with NVIDIA Tensor Core. |
| gemm-flops/fp8_tc_flops | FLOPS (GFLOPS) | GEMM FP8 (E4M3) peak FLOPS with NVIDIA Tensor Core. |
| gemm-flops/nvfp4_tc_flops | FLOPS (GFLOPS) | GEMM NVFP4 (E2M1, UE4M3 scale per 16 values) peak FLOPS with NVIDIA Tensor Core. |
| gemm-flops/nvfp4_ue5m3_tc_flops | FLOPS (GFLOPS) | GEMM NVFP4 (E2M1, UE5M3 scale per 16 values) peak FLOPS with NVIDIA Tensor Core. |
| gemm-flops/mxfp8_tc_flops | FLOPS (GFLOPS) | GEMM MXFP8 (E4M3, E8M0 scale per 32 values) peak FLOPS with NVIDIA Tensor Core. |
| gemm-flops/mxfp4_tc_flops | FLOPS (GFLOPS) | GEMM MXFP4 (E2M1, E8M0 scale per 32 values) peak FLOPS with NVIDIA Tensor Core. |
| gemm-flops/fp32_xdlops_flops | FLOPS (GFLOPS) | GEMM tensor-float32 peak FLOPS with AMD XDLOPS. |
| gemm-flops/fp16_xdlops_flops | FLOPS (GFLOPS) | GEMM float16 peak FLOPS with AMD XDLOPS. |
| gemm-flops/bf16_xdlops_flops | FLOPS (GFLOPS) | GEMM bfloat16 peak FLOPS with AMD XDLOPS. |
| gemm-flops/int8_xdlops_iops | IOPS (GIOPS) | GEMM int8 peak IOPS with AMD XDLOPS. |

### `matmul`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

"""Module of the FLOPs performance benchmarks."""

import fnmatch
import os
import re

from superbench.common.utils import logger
from superbench.common.utils import device_manager as dm
Expand Down Expand Up @@ -52,16 +54,71 @@ def __init__(self, name, parameters=''):
self.__kernel_map[8.9] = {k: self.__kernel_map[8.0][k] for k in self.__kernel_map[8.0] if 'fp64' not in k}
# Skip INT4 for Hopper due to no native CUDA/Tensor Cores
self.__kernel_map[9.0] = {k: self.__kernel_map[8.0][k] for k in self.__kernel_map[8.0] if 'int4_tc' not in k}
self.__kernel_map[10.0] = {k: self.__kernel_map[8.0][k] for k in self.__kernel_map[8.0] if 'int4_tc' not in k}
self.__kernel_map[10.3] = {k: self.__kernel_map[8.0][k] for k in self.__kernel_map[8.0] if 'int4_tc' not in k}
self.__kernel_map[10.7] = {k: self.__kernel_map[8.0][k] for k in self.__kernel_map[8.0] if 'int4_tc' not in k}
# FP8 (e4m3) on Hopper SM90a: CUTLASS 3x WGMMA kernels; v3.x names put the MMA shape before "gemm".
self.__kernel_map[9.0]['fp8_tc'] = 'cutlass3x_sm90_tensorop_*gemm_e4m3_e4m3_f32_f32_f32_*'
Comment thread
polarG marked this conversation as resolved.
Resolved
# Blackwell (SM100/SM103): CUTLASS v4.3.5 (v4.8.0 with CUDA 13.4+) UMMA TensorOp kernels.
# Runtime --kernels patterns select stream_k + 2sm kernels for peak FLOPS.
# TF32/FP16/BF16: 256x256 tiles only (best for 32/64-byte K-tiles).
# INT8/FP8: include 128x256 + 256x256 because their larger K-tile (128)
# changes optimal tile shape; 256x256 non-epi_tma may fail at runtime.
# FP4: all ~49 kernels (small enough).
# Trailing * after stream_k_2sm matches both _2sm and _2sm_epi_tma.
self.__kernel_map[10.0] = {
'tf32_tc': 'cutlass3x_sm100_tensorop_tf32gemm*256x256x*stream_k_2sm*',
Comment thread
polarG marked this conversation as resolved.
Resolved
'bf16_tc': 'cutlass3x_sm100_tensorop_gemm_bf16_bf16_f32_bf16_bf16*256x256x*stream_k_2sm*',
'fp16_tc': 'cutlass3x_sm100_tensorop_gemm_f16_f16_f32_f16_f16*256x256x*stream_k_2sm*',
'int8_tc': 'cutlass3x_sm100_tensorop_gemm_s8_s8_s32_s8_s8*256x*stream_k_2sm*',
'fp8_tc': 'cutlass3x_sm100_tensorop_gemm_e4m3_e4m3_f32_f32_f32*256x*stream_k_2sm*',
}
# SM103a (GB300 "Blackwell Ultra"):
# - Lacks INT8 UMMA (tcgen05.mma.kind::i8); CuTe's config.hpp only
# defines CUTE_ARCH_TCGEN05_S8_MMA_ENABLED for SM100a/SM101a.
# - Adds NVFP4 (block-scaled FP4) via the BlockScaledGemm operation.
# The FP4 Ultra path uses sm103-specific bstensorop kernels with
# ue4m3 scale factor and vs16 block size (NVFP4 spec).
# nvfp4_tc kernels are profiled with --operation=block_scaled_gemm
# (auto-detected from the kernel name prefix in _preprocess).
self.__kernel_map[10.3] = {k: v for k, v in self.__kernel_map[10.0].items() if k != 'int8_tc'}
self.__kernel_map[10.3]['nvfp4_tc'] = \
'cutlass3x_sm103_bstensorop_gemm_ue4m3xe2m1_ue4m3xe2m1_f32_void_f32*256x*ultra_2sm*'
# Rubin SM107a: CUTLASS v4.8.0 kernels from the separate cutlass_sm107 install (third_party/cutlass.mk).
# - TF32/FP16/BF16: SM100 generators retargeted to Sm107, selected like SM100.
# - FP8, NVFP4 (UE4M3 or UE5M3 scales, 16-element blocks) and MXFP8/MXFP4 (UE8M0 scales, 32-element
# blocks): native SM107 kernels (B-reuse schedules, no stream-K), N=256 2SM tiles.
# - No INT8: CuTe enables tcgen05 kind::i8 only for SM100a/SM101a/SM110.
self.__kernel_map[10.7] = {
'tf32_tc': 'cutlass3x_sm107_tensorop_tf32gemm*256x256x*stream_k_2sm*',
'bf16_tc': 'cutlass3x_sm107_tensorop_gemm_bf16_bf16_f32_bf16_bf16*256x256x*stream_k_2sm*',
'fp16_tc': 'cutlass3x_sm107_tensorop_gemm_f16_f16_f32_f16_f16*256x256x*stream_k_2sm*',
'fp8_tc': 'cutlass3x_sm107_tensorop_gemm_f8_f8_f32_f32_f32*x256x128_*breuse_2sm*',
'nvfp4_tc':
'cutlass3x_sm107_bstensorop_gemm_ue4m3xe2m1_ue4m3xe2m1_f32_void_f32*x256x256_*o_vs16_*breuse_2sm*',
'nvfp4_ue5m3_tc':
'cutlass3x_sm107_bstensorop_gemm_ue5m3xe2m1_ue5m3xe2m1_f32_void_f32*x256x256_*o_vs16_*breuse_2sm*',
'mxfp8_tc': 'cutlass3x_sm107_bstensorop_gemm_ue8m0xf8_ue8m0xf8_f32_void_f32*x256x128_*breuse_2sm*',
'mxfp4_tc':
'cutlass3x_sm107_bstensorop_gemm_ue8m0xe2m1_ue8m0xe2m1_f32_void_f32*x256x256_*o_vs32_*breuse_2sm*',
}
# Compute capabilities whose CUTLASS build lives in its own SB_MICRO_PATH subfolder.
self.__cutlass_subdir = {10.7: 'cutlass_sm107'}
self.__capability = None
# Install prefix of the selected cutlass_profiler, i.e. the parent of its real bin folder.
self.__install_prefix = None
# '<OperationKind>,<kernel name prefix>' of CSV rows to parse: legacy SM70/SM80, SM90, SM100, SM103, SM107.
# Block-scaled kernels report OperationKind 'gemm' (substring matching also accepts 'block_scaled_gemm').
self.__parse_logline = [
'gemm,cutlass_simt_dgemm_128x128_8x2', 'gemm,cutlass_simt_sgemm_128x128_8x2',
'gemm,cutlass_simt_hgemm_256x128_8x2', 'gemm,cutlass_tensorop_d884gemm_128x128_16x3',
'gemm,cutlass_tensorop_tf32_s1688gemm_tf32_256x128_16x3',
'gemm,cutlass_tensorop_bf16_s16816gemm_bf16_256x128_32x3', 'gemm,cutlass_tensorop_h16816gemm_256x128_32x3',
'gemm,cutlass_tensorop_h884gemm_256x128_32x2', 'gemm,cutlass_tensorop_s8_i16832gemm_s8_256x128_64x3',
'gemm,cutlass_tensorop_s4_i16864gemm_s4_256x128_128x3'
'gemm,cutlass_tensorop_s4_i16864gemm_s4_256x128_128x3', 'gemm,cutlass3x_sm90_tensorop_',
'gemm,cutlass3x_sm100_tensorop_tf32gemm_', 'gemm,cutlass3x_sm100_tensorop_gemm_f16_',
'gemm,cutlass3x_sm100_tensorop_gemm_bf16_', 'gemm,cutlass3x_sm100_tensorop_gemm_s8_',
'gemm,cutlass3x_sm100_tensorop_gemm_e4m3_e4m3_', 'gemm,cutlass3x_sm103_bstensorop_gemm_ue4m3xe2m1_',
'gemm,cutlass3x_sm103_bstensorop_gemm_ue4m3xf4_', 'gemm,cutlass3x_sm107_tensorop_tf32gemm_',
'gemm,cutlass3x_sm107_tensorop_gemm_f16_', 'gemm,cutlass3x_sm107_tensorop_gemm_bf16_',
'gemm,cutlass3x_sm107_tensorop_gemm_f8_f8_', 'gemm,cutlass3x_sm107_bstensorop_'
]

def add_parser_arguments(self):
Expand All @@ -74,8 +131,8 @@ def _preprocess(self):
Return:
True if _preprocess() succeed.
"""
# Reset kernels according to compute capability.
capability = dm.device_manager.get_device_compute_capability()
# Reset kernels according to the compute capability of the GPU visible to this process.
capability = dm.device_manager.get_visible_device_compute_capability()
if capability not in self.__kernel_map:
# After preprocess() self._result.return_code can be generated
super()._preprocess()
Expand All @@ -87,24 +144,94 @@ def _preprocess(self):
)
return False

self.__capability = capability
Comment thread
polarG marked this conversation as resolved.
Resolved
self._support_precisions = list(self.__kernel_map[capability].keys())
# 'support_precisions' are precise only after getting capability,
# and then using super.preprocess() to check if the precision in arguments are supported to run
if not super()._preprocess():
return False

if not self.__filter_installed_precisions():
return False

for p in self._precision_need_to_run:
kernels = self.__kernel_map[capability][p]
command = os.path.join(self._args.bin_dir, self._bin_name)
command += (' --warmup-iterations=' + str(self._args.num_warmup))
command += (' --operation=gemm')
# Block-scaled kernels (bstensorop) are only listed under the block_scaled_gemm operation.
operation = 'block_scaled_gemm' if '_bstensorop_' in kernels else 'gemm'
command += (' --operation=' + operation)
Comment thread
Copilot marked this conversation as resolved.
Resolved
command += (' --n=' + str(self._args.n))
command += (' --k=' + str(self._args.k))
command += (' --m=' + str(self._args.m))
command += (' --kernels=' + self.__kernel_map[capability][p])
command += (' --kernels=' + kernels)
# Runtime-typed FP8 kernels ("f8" elements: gemm_f8_f8, ue8m0xf8) take the A/B type at launch.
if re.search(r'[_x]f8_', kernels):
command += ' --runtime_input_datatype_a=e4m3 --runtime_input_datatype_b=e4m3'
# cutlass_profiler verifies block-scaled kernels only against a host (CPU) reference, which is impractically
# slow at the default problem size, so skip verification for these throughput runs.
if operation == 'block_scaled_gemm':
command += ' --verification-enabled=false'
self._commands.append(command)

return True

def __filter_installed_precisions(self):
"""Skip precisions whose kernels are not in the installed CUTLASS kernel list.

CUTLASS v3.x and later install the list of generated kernels to <prefix>/share/cutlass/generated_kernels.txt
(third_party/cutlass.mk). Without that list, e.g. for CUTLASS v2.x, all precisions are kept.

Return:
True if at least one precision remains to run.
"""
kernel_list = os.path.join(self.__install_prefix, 'share', 'cutlass', 'generated_kernels.txt')
if not os.path.isfile(kernel_list):
return True
with open(kernel_list) as f:
installed = [line.strip() for line in f if line.strip()]

precisions = list()
for p in self._precision_need_to_run:
# cutlass_profiler matches --kernels patterns anywhere in the kernel name.
pattern = '*' + self.__kernel_map[self.__capability][p] + '*'
if any(fnmatch.fnmatchcase(name, pattern) for name in installed):
precisions.append(p)
else:
logger.warning(
'No installed CUTLASS kernels - benchmark: {}, precision: {}, kernel list: {}.'.format(
self._name, p, kernel_list
)
)
self._precision_need_to_run = precisions

if len(self._precision_need_to_run) == 0:
self._result.set_return_code(ReturnCode.NO_SUPPORTED_PRECISION)
return False
return True

def _set_binary_path(self):
"""Search cutlass_profiler in the per-architecture CUTLASS install unless --bin_dir is given.

Return:
True if the binary exists.
"""
subdir = self.__cutlass_subdir.get(self.__capability)
if subdir and self._args.bin_dir is None and os.getenv('SB_MICRO_PATH'):
self._args.bin_dir = os.path.join(os.getenv('SB_MICRO_PATH'), subdir, 'bin')
if not super()._set_binary_path():
return False
self._args.bin_dir = os.path.abspath(self._args.bin_dir)
self.__install_prefix = os.path.dirname(
os.path.dirname(os.path.realpath(os.path.join(self._args.bin_dir, self._bin_name)))
)
# cutlass_profiler only runs kernels from its own build's libcutlass*.so, and LD_LIBRARY_PATH outranks RUNPATH,
# so put the lib folder of the selected install ahead of SB_MICRO_PATH/lib.
lib_dir = os.path.join(self.__install_prefix, 'lib')
if os.path.isdir(lib_dir):
os.environ['LD_LIBRARY_PATH'] = lib_dir + os.pathsep + os.getenv('LD_LIBRARY_PATH', '')
return True

def _process_raw_result(self, cmd_idx, raw_output):
"""Function to parse raw results and save the summarized results.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def __init__(self, name, parameters=''):
super().__init__(name, parameters)

self._support_precisions = [
'fp64', 'fp32', 'fp16', 'fp64_tc', 'tf32_tc', 'bf16_tc', 'fp16_tc', 'int8_tc', 'int4_tc'
'fp64', 'fp32', 'fp16', 'fp64_tc', 'tf32_tc', 'bf16_tc', 'fp16_tc', 'int8_tc', 'int4_tc', 'fp8_tc',
'nvfp4_tc', 'nvfp4_ue5m3_tc', 'mxfp8_tc', 'mxfp4_tc'
]
self._precision_need_to_run = list()
self._metric_map = {
Expand All @@ -33,6 +34,11 @@ def __init__(self, name, parameters=''):
'fp16_tc': 'fp16_tc_flops',
'int8_tc': 'int8_tc_iops',
'int4_tc': 'int4_tc_iops',
'fp8_tc': 'fp8_tc_flops',
'nvfp4_tc': 'nvfp4_tc_flops',
'nvfp4_ue5m3_tc': 'nvfp4_ue5m3_tc_flops',
'mxfp8_tc': 'mxfp8_tc_flops',
'mxfp4_tc': 'mxfp4_tc_flops',
'fp32_xdlops': 'fp32_xdlops_flops',
'fp16_xdlops': 'fp16_xdlops_flops',
'bf16_xdlops': 'bf16_xdlops_flops',
Expand Down
Loading
Loading