Repository navigation
Benchmarks: Restore valid timings for two default cuDNN convolutions - #901
Open
gusui-msft wants to merge 7 commits into
Open
gusui-msft wants to merge 7 commits into
gusui-msft wants to merge 7 commits into
Conversation
…n 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: f346819 Co-authored-by: Copilot <[email protected]>
Check that every default convolution returns a finite, positive timing. Document why the two replacement algorithms need fresh baselines. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the targeted cuDNN algorithm updates and related regression tests and documentation.
No open issues 🎉
What changed in this PR
Restores valid timings for two default cuDNN convolution workloads by replacing unsupported fixed Winograd algorithms, while leaving the other 16 configurations and automatic-selection behavior unchanged.
Changes:
- Switch the affected FP32 forward and backward-data convolutions to algorithm
1. - Strengthen the default-suite regression to require exactly 18 finite, positive timings.
- Document the algorithm-specific metric name changes and need for fresh baselines.
| File | Description |
|---|---|
| tests/benchmarks/micro_benchmarks/test_cudnn_function.py | Enforces exact result count, timing metric suffixes, and finite positive values. |
| superbench/benchmarks/micro_benchmarks/cudnn_function.py | Updates the two affected default convolution algorithms to 1. |
| docs/user-tutorial/benchmarks/micro-benchmarks.md | Explains algorithm compatibility and baseline migration for the two timings. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #901 +/- ##
=======================================
Coverage 86.36% 86.36%
=======================================
Files 107 107
Lines 8258 8258
=======================================
Hits 7132 7132
Misses 1126 1126
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
gusui-msft
marked this pull request as ready for review
November 19, 2026 01:55
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Two default FP32 convolutions with a
32 × 128 × 3 × 3filter request fixed Winograd algorithms that cuDNN does not support for these cases on H100 and GB300. The workspace-size query fails, the native program printsError, and SuperBench records-1for both timings and return code 33 for the suite. This PR carries forward Hongtao Zhang's original fix (f346819) without changing the product patch.Major Revision
6to1and backward-data from4to1for these two cases. The other 16 configurations, timing loop, error handling and opt-in automatic selection are unchanged.Minor Revision
Hardware validation
Tested the base and candidate wrappers on the same eight H100 80 GB GPUs with the same native binary and pinned public image (
superbench/main@sha256:a60ded790da4db0b9a104fee5efd93808b40c7a731a3f5101f973d3898d0eb2f, CUDA 13.0, cuDNN 9.12). Used all 18 default cases with auto-selection off, 10 warmups and 10 measured steps of 100 calls per case.main(c548e79f)dd8c46e)6and backward-data4, bothCUDNN_STATUS_NOT_SUPPORTEDat workspace queryThe committed
test_cudnn_function.pyalso passed on H100 (1 pytest test, including the default, custom and auto-selection paths). Hongtao's original commit records RC 0 and 18 valid timings on each of four GB300 GPUs in his validation container. This PR has not been tested in a new GB300 release image.