From 391413c8fb2c3db787c0b8b2c9f73e7a87af5170 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Tue, 30 Jun 2026 23:36:44 +0000 Subject: [PATCH 1/7] Bugfix - cudnn-function: use algo 1 instead of unsupported Winograd on Blackwell/cuDNN 9.x Root cause: The cudnn-function micro-benchmark hardcodes convolution test configs, each pinning a fixed cuDNN algorithm. Two of them request the legacy Winograd algorithm on an FP32 3x3 convolution: - cudnnConvolutionForward algo 6 = CUDNN_CONVOLUTION_FWD_ALGO_WINOGRAD - cudnnConvolutionBackwardData algo 4 = CUDNN_CONVOLUTION_BWD_DATA_ALGO_WINOGRAD On NVIDIA GB300 (Blackwell, sm_100/103) with cuDNN 9.x, Winograd is not implemented for these shapes, so cudnnGetConvolution*WorkspaceSize() returns CUDNN_STATUS_NOT_SUPPORTED. The binary prints "Error: ..." (and still exits 0), _process_raw_result() records the metric as -1 and returns False, and micro_base sets ReturnCode.MICROBENCHMARK_RESULT_PARSING_FAILURE (33). Because tolerant_fail=True the other configs still run, but the overall benchmark return code stays 33, failing the run on all GPUs. This is expected library behavior, not a hardware fault: cuDNN 9.x removed legacy fixed Winograd kernels for new architectures, and older cuDNN that supported Winograd does not support sm_100, so updating cuDNN cannot restore it. Solution: Switch the two unsupported Winograd cases to algo 1 - the general, broadly-supported algorithm already used by every other FP32 conv config here: - forward: algo 1 = CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_GEMM - backward-data: algo 1 = CUDNN_CONVOLUTION_BWD_DATA_ALGO_1 (deterministic) Validation (GB300, CUDA 13.0, cuDNN 9.12): with algo 1 both cases pass and produce timings (~41 ms fwd, ~46 ms bwd-data) where algo 4/6 returned CUDNN_STATUS_NOT_SUPPORTED; the full cudnn-function benchmark now returns 0 on all 4 GPUs with all 18 configs producing valid results. Compatibility: algo 1 is supported on A100/H100/H200 too, so this is safe across architectures. On arches where Winograd previously worked, these two metrics are renamed (algo_6/algo_4 -> algo_1) and now measure implicit-GEMM. Cherry-picked-from: f346819966f95c1621c5c72101f32a6b888792e2 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- superbench/benchmarks/micro_benchmarks/cudnn_function.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/superbench/benchmarks/micro_benchmarks/cudnn_function.py b/superbench/benchmarks/micro_benchmarks/cudnn_function.py index 3bc601742..dbe535c70 100644 --- a/superbench/benchmarks/micro_benchmarks/cudnn_function.py +++ b/superbench/benchmarks/micro_benchmarks/cudnn_function.py @@ -139,7 +139,7 @@ def __init__(self, name, parameters=''): 'mode': 1 }, { 'name': 'cudnnConvolutionBackwardData', - 'algo': 4, + 'algo': 1, 'filterDims': [32, 128, 3, 3], 'inputType': 0, 'inputDims': [32, 32, 14, 14], @@ -232,7 +232,7 @@ def __init__(self, name, parameters=''): 'tensorOp': False, 'inputType': 0, 'convType': 0, - 'algo': 6 + 'algo': 1 }, { 'name': 'cudnnConvolutionForward', 'inputDims': [32, 128, 14, 14], From dd8c46ebcf004ef0d79b99493de800e3fd11e85c Mon Sep 17 00:00:00 2001 From: Guoxin Sui Date: Wed, 18 Nov 2026 16:05:55 -0700 Subject: [PATCH 2/7] Benchmarks: Require 18 valid cuDNN default timings Check that every default convolution returns a finite, positive timing. Document why the two replacement algorithms need fresh baselines. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/user-tutorial/benchmarks/micro-benchmarks.md | 7 +++++++ .../micro_benchmarks/test_cudnn_function.py | 11 +++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/user-tutorial/benchmarks/micro-benchmarks.md b/docs/user-tutorial/benchmarks/micro-benchmarks.md index 4b385c10d..c16ff5b1e 100644 --- a/docs/user-tutorial/benchmarks/micro-benchmarks.md +++ b/docs/user-tutorial/benchmarks/micro-benchmarks.md @@ -148,6 +148,13 @@ The benchmark already supports `--enable_auto_algo` (off by default), which call convolution. Without it, the configured legacy convolution algorithm is used. This option predates CUDA 13.4; it does not benchmark the algorithm search itself. +For the default FP32 forward and backward-data cases with a `32 x 128 x 3 x 3` +filter, the benchmark uses fixed algorithm `1` for each operation. The previous +Winograd algorithms (`6` for forward, `4` for backward-data) were unsupported +for these cases on GB300 with cuDNN 9.12. The algorithm ID is part of the +metric name: collect new baselines for these two timings rather than comparing +them with the old Winograd timings. + With cuDNN 9.26 in the CUDA 13.4 image, these convolution benchmarks can use compute capability 10.7. The [cuDNN 9.26 release notes](https://docs.nvidia.com/deeplearning/cudnn/backend/v9.26.0/release-notes.html#cudnn-9-26-0) diff --git a/tests/benchmarks/micro_benchmarks/test_cudnn_function.py b/tests/benchmarks/micro_benchmarks/test_cudnn_function.py index d6ca117c2..652be3a0c 100644 --- a/tests/benchmarks/micro_benchmarks/test_cudnn_function.py +++ b/tests/benchmarks/micro_benchmarks/test_cudnn_function.py @@ -3,6 +3,7 @@ """Tests for cudnn-functions benchmark.""" +import math import numbers from tests.helper import decorator @@ -38,11 +39,13 @@ def test_cudnn_functions(): assert (len(benchmark.raw_data['raw_output_0']) == 1) assert (isinstance(benchmark.raw_data['raw_output_0'][0], str)) - assert (18 <= len(benchmark.result)) - for metric in list(benchmark.result.keys()): - assert (len(benchmark.result[metric]) == 1) - assert (isinstance(benchmark.result[metric][0], numbers.Number)) + assert (18 + benchmark.default_metric_count == len(benchmark.result)) + for metric, values in benchmark.result.items(): + assert (len(values) == 1) + assert (isinstance(values[0], numbers.Number)) if metric != 'return_code': + assert metric.endswith('_time') + assert math.isfinite(values[0]) and values[0] > 0, metric assert (len(benchmark.raw_data[metric][0]) == benchmark._args.num_steps) # Test for custom configuration From 2dddf29263d051bca2b5600be1a95ed5903652b9 Mon Sep 17 00:00:00 2001 From: Guoxin Sui Date: Wed, 18 Nov 2026 16:49:55 -0700 Subject: [PATCH 3/7] Benchmarks: Simplify cuDNN timing checks and migration note Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/user-tutorial/benchmarks/micro-benchmarks.md | 9 +++------ .../micro_benchmarks/test_cudnn_function.py | 14 ++++++-------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/docs/user-tutorial/benchmarks/micro-benchmarks.md b/docs/user-tutorial/benchmarks/micro-benchmarks.md index c16ff5b1e..dfcfadf41 100644 --- a/docs/user-tutorial/benchmarks/micro-benchmarks.md +++ b/docs/user-tutorial/benchmarks/micro-benchmarks.md @@ -148,12 +148,9 @@ The benchmark already supports `--enable_auto_algo` (off by default), which call convolution. Without it, the configured legacy convolution algorithm is used. This option predates CUDA 13.4; it does not benchmark the algorithm search itself. -For the default FP32 forward and backward-data cases with a `32 x 128 x 3 x 3` -filter, the benchmark uses fixed algorithm `1` for each operation. The previous -Winograd algorithms (`6` for forward, `4` for backward-data) were unsupported -for these cases on GB300 with cuDNN 9.12. The algorithm ID is part of the -metric name: collect new baselines for these two timings rather than comparing -them with the old Winograd timings. +For the default FP32 `32 x 128 x 3 x 3` filter, the fixed algorithm changed from `6` to `1` +for forward and from `4` to `1` for backward-data. Collect new baselines for the two renamed +metrics because the old timings measured Winograd. With cuDNN 9.26 in the CUDA 13.4 image, these convolution benchmarks can use compute capability 10.7. The diff --git a/tests/benchmarks/micro_benchmarks/test_cudnn_function.py b/tests/benchmarks/micro_benchmarks/test_cudnn_function.py index 652be3a0c..72b34ea2f 100644 --- a/tests/benchmarks/micro_benchmarks/test_cudnn_function.py +++ b/tests/benchmarks/micro_benchmarks/test_cudnn_function.py @@ -39,14 +39,12 @@ def test_cudnn_functions(): assert (len(benchmark.raw_data['raw_output_0']) == 1) assert (isinstance(benchmark.raw_data['raw_output_0'][0], str)) - assert (18 + benchmark.default_metric_count == len(benchmark.result)) - for metric, values in benchmark.result.items(): - assert (len(values) == 1) - assert (isinstance(values[0], numbers.Number)) - if metric != 'return_code': - assert metric.endswith('_time') - assert math.isfinite(values[0]) and values[0] > 0, metric - assert (len(benchmark.raw_data[metric][0]) == benchmark._args.num_steps) + timings = {metric: values for metric, values in benchmark.result.items() if metric.endswith('_time')} + assert len(timings) == 18 + for metric, values in timings.items(): + assert len(values) == 1, metric + assert math.isfinite(values[0]) and values[0] > 0, metric + assert len(benchmark.raw_data[metric][0]) == benchmark._args.num_steps, metric # Test for custom configuration custom_config_str = '{"algo":0,"arrayLength":2,"convType":0,"dilationA":[1,1],"filterStrideA":[1,1],' \ From c62e2c90fca00a3e5ab902828ff1e2b4efa8e9e6 Mon Sep 17 00:00:00 2001 From: Guoxin Sui Date: Wed, 18 Nov 2026 17:01:37 -0700 Subject: [PATCH 4/7] Docs: Explain how to match cuDNN timing baselines Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/user-tutorial/benchmarks/micro-benchmarks.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/user-tutorial/benchmarks/micro-benchmarks.md b/docs/user-tutorial/benchmarks/micro-benchmarks.md index dfcfadf41..9ad76270e 100644 --- a/docs/user-tutorial/benchmarks/micro-benchmarks.md +++ b/docs/user-tutorial/benchmarks/micro-benchmarks.md @@ -148,10 +148,6 @@ The benchmark already supports `--enable_auto_algo` (off by default), which call convolution. Without it, the configured legacy convolution algorithm is used. This option predates CUDA 13.4; it does not benchmark the algorithm search itself. -For the default FP32 `32 x 128 x 3 x 3` filter, the fixed algorithm changed from `6` to `1` -for forward and from `4` to `1` for backward-data. Collect new baselines for the two renamed -metrics because the old timings measured Winograd. - With cuDNN 9.26 in the CUDA 13.4 image, these convolution benchmarks can use compute capability 10.7. The [cuDNN 9.26 release notes](https://docs.nvidia.com/deeplearning/cudnn/backend/v9.26.0/release-notes.html#cudnn-9-26-0) @@ -166,6 +162,9 @@ also flag limitations for FP8 pointwise fusion and certain SM 107 attention engi |-----------------------------------------------------------|-----------|------------------------------------------------------------------| | cudnn-function/name\_${function_name}\_${parameters}_time | time (us) | The mean time to execute the cudnn function with the parameters. | +For fixed-algorithm runs, use a baseline for the same GPU model and the full metric name. +The name includes the convolution parameters and the configured algorithm ID. + ### `tensorrt-inference` #### Introduction From 27b41a1adb44fe7e6dd0ad794e0970a89ad0b94a Mon Sep 17 00:00:00 2001 From: Guoxin Sui Date: Wed, 18 Nov 2026 17:07:51 -0700 Subject: [PATCH 5/7] Docs: Drop the generic cuDNN baseline note Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/user-tutorial/benchmarks/micro-benchmarks.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/user-tutorial/benchmarks/micro-benchmarks.md b/docs/user-tutorial/benchmarks/micro-benchmarks.md index 9ad76270e..4b385c10d 100644 --- a/docs/user-tutorial/benchmarks/micro-benchmarks.md +++ b/docs/user-tutorial/benchmarks/micro-benchmarks.md @@ -162,9 +162,6 @@ also flag limitations for FP8 pointwise fusion and certain SM 107 attention engi |-----------------------------------------------------------|-----------|------------------------------------------------------------------| | cudnn-function/name\_${function_name}\_${parameters}_time | time (us) | The mean time to execute the cudnn function with the parameters. | -For fixed-algorithm runs, use a baseline for the same GPU model and the full metric name. -The name includes the convolution parameters and the configured algorithm ID. - ### `tensorrt-inference` #### Introduction From 4047adcb59747b73bd264cc81ef8f30b9d690e9c Mon Sep 17 00:00:00 2001 From: Guoxin Sui Date: Wed, 18 Nov 2026 17:12:33 -0700 Subject: [PATCH 6/7] Benchmarks: Focus the default cuDNN regression on timings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../micro_benchmarks/test_cudnn_function.py | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/tests/benchmarks/micro_benchmarks/test_cudnn_function.py b/tests/benchmarks/micro_benchmarks/test_cudnn_function.py index 72b34ea2f..b84e8f492 100644 --- a/tests/benchmarks/micro_benchmarks/test_cudnn_function.py +++ b/tests/benchmarks/micro_benchmarks/test_cudnn_function.py @@ -17,33 +17,13 @@ def test_cudnn_functions(): context = BenchmarkRegistry.create_benchmark_context( 'cudnn-function', platform=Platform.CUDA, parameters='--num_warmup 10 --num_steps 10 --num_in_step 100' ) - - assert (BenchmarkRegistry.is_benchmark_context_valid(context)) - benchmark = BenchmarkRegistry.launch_benchmark(context) - - # Check basic information. - assert (benchmark) - assert (benchmark.name == 'cudnn-function') - assert (benchmark.type == BenchmarkType.MICRO) - - # Check parameters specified in BenchmarkContext. - assert (benchmark._args.num_warmup == 10) - assert (benchmark._args.num_steps == 10) - assert (benchmark._args.num_in_step == 100) - - # Check results and metrics. - assert (benchmark.run_count == 1) - assert (benchmark.return_code == ReturnCode.SUCCESS) - assert ('raw_output_0' in benchmark.raw_data) - assert (len(benchmark.raw_data['raw_output_0']) == 1) - assert (isinstance(benchmark.raw_data['raw_output_0'][0], str)) + assert benchmark.return_code == ReturnCode.SUCCESS timings = {metric: values for metric, values in benchmark.result.items() if metric.endswith('_time')} assert len(timings) == 18 for metric, values in timings.items(): - assert len(values) == 1, metric - assert math.isfinite(values[0]) and values[0] > 0, metric + assert len(values) == 1 and 0 < values[0] < math.inf, metric assert len(benchmark.raw_data[metric][0]) == benchmark._args.num_steps, metric # Test for custom configuration From a3dec4dd321ecdb5286bdb18087818add7320520 Mon Sep 17 00:00:00 2001 From: Guoxin Sui Date: Wed, 18 Nov 2026 18:15:31 -0700 Subject: [PATCH 7/7] Benchmarks: Clarify the cuDNN timing sentinel check Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/benchmarks/micro_benchmarks/test_cudnn_function.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/benchmarks/micro_benchmarks/test_cudnn_function.py b/tests/benchmarks/micro_benchmarks/test_cudnn_function.py index b84e8f492..1e7ab424e 100644 --- a/tests/benchmarks/micro_benchmarks/test_cudnn_function.py +++ b/tests/benchmarks/micro_benchmarks/test_cudnn_function.py @@ -23,6 +23,7 @@ def test_cudnn_functions(): timings = {metric: values for metric, values in benchmark.result.items() if metric.endswith('_time')} assert len(timings) == 18 for metric, values in timings.items(): + # Unsupported convolutions still emit a timing metric with value -1. assert len(values) == 1 and 0 < values[0] < math.inf, metric assert len(benchmark.raw_data[metric][0]) == benchmark._args.num_steps, metric