Skip to content

Benchmarks: Restore valid timings for two default cuDNN convolutions - #901

Open
gusui-msft wants to merge 7 commits into
mainfrom
gusui-msft/cudnn-rc33-default-coverage
Open

gusui-msft wants to merge 7 commits into
mainfrom
gusui-msft/cudnn-rc33-default-coverage

Conversation

@gusui-msft

Copy link
Copy Markdown
Contributor

Description

Two default FP32 convolutions with a 32 × 128 × 3 × 3 filter request fixed Winograd algorithms that cuDNN does not support for these cases on H100 and GB300. The workspace-size query fails, the native program prints Error, and SuperBench records -1 for 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

  • Switch the default forward algorithm from 6 to 1 and backward-data from 4 to 1 for these two cases. The other 16 configurations, timing loop, error handling and opt-in automatic selection are unchanged.

Minor Revision

  • Require RC 0 and exactly 18 finite, positive timings in the existing default-suite CUDA regression.
  • Document that the two new algorithm-specific metric names need fresh baselines. This restores workload coverage; it does not address latency variance.

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.

H100 result main (c548e79f) Candidate (dd8c46e)
Suite return code 33 on 8/8 GPUs 0 on 8/8 GPUs
Finite positive timings per GPU 16/18 18/18
Missing timings Forward 6 and backward-data 4, both CUDNN_STATUS_NOT_SUPPORTED at workspace query None

The committed test_cudnn_function.py also 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.

…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]>
Copilot AI balanced review requested due to automatic review settings November 18, 2026 23:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.36%. Comparing base (c548e79) to head (a3dec4d).

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           
Flag Coverage Δ
cpu-python3.10-unit-test 71.95% <ø> (ø)
cpu-python3.12-unit-test 71.95% <ø> (ø)
cpu-python3.7-unit-test 71.41% <ø> (ø)
cuda-unit-test 84.37% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI balanced review requested due to automatic review settings November 18, 2026 23:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the targeted cuDNN algorithm replacements and accompanying regression-test and baseline-migration updates.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 19, 2026 00:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the targeted cuDNN algorithm updates and associated regression coverage changes.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 19, 2026 00:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the cuDNN algorithm updates and strengthened default-suite timing checks.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 19, 2026 00:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the targeted cuDNN algorithm updates and regression-test changes.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 19, 2026 01:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the change restoring timing coverage for two default cuDNN convolutions.

No open issues 🎉

Review effort: Balanced

@gusui-msft
gusui-msft marked this pull request as ready for review November 19, 2026 01:55
@gusui-msft
gusui-msft requested a review from a team as a code owner November 19, 2026 01:55

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants