pytorch - ✅(Solved) Fix [CUDA] Wrong `owidth_for_shape_check` in `AveragePool3d.cu` [1 pull requests, 3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
pytorch/pytorch#178719Fetched 2026-04-08 01:48:27
View on GitHub
Comments
3
Participants
3
Timeline
31
Reactions
0
Timeline (top)
mentioned ×7subscribed ×7labeled ×5referenced ×5

Fix Action

Fixed

PR fix notes

PR #178720: [CUDA] Fix wrong owidth_for_shape_check in AveragePool3d.cu

Description (problem / solution / changelog)

This fixes #178719

Changed files

  • aten/src/ATen/native/cuda/AveragePool3d.cu (modified, +1/-1)
RAW_BUFFERClick to expand / collapse

🐛 Describe the bug

owidth_for_chape_check has to be owidth_for_shape_check in AveragePool3d.cu

This is also used in _meta_registrations.py owidth_for_shape_check = pooling_output_shape(iwidth, kW, padW, dW, 1, ceil_mode) and const int64_t owidth_for_shape_check = pooling_output_shape<int64_t>(iwidth, kW, padW, dW, 1, ceil_mode); in AveragePool3d.cpp (but in this case not in cuda, but in native ATen (but here in both cases correct))

Versions

Latest

cc @ptrblck @msaroufim @eqy @jerryzh168 @tinglvv @nWEIdia @mikaylagawarecki

extent analysis

Fix Plan

To fix the bug, we need to rename the variable owidth_for_chape_check to owidth_for_shape_check in AveragePool3d.cu.

Code Changes

  • In AveragePool3d.cu, replace:
int owidth_for_chape_check = ...;

with:

int owidth_for_shape_check = ...;
  • Verify that the same correction is not needed in other files, but in this case, _meta_registrations.py and AveragePool3d.cpp already use the correct variable name.

Verification

  • Recompile the code and run tests to ensure that the fix does not introduce any new issues.
  • Specifically, test the AveragePool3d function with different input shapes and parameters to verify that it produces the correct output.

Extra Tips

  • Double-check that the fix is applied correctly and that no other instances of the incorrect variable name exist in the codebase.
  • Consider adding a test case to catch similar typos in the future.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

pytorch - ✅(Solved) Fix [CUDA] Wrong `owidth_for_shape_check` in `AveragePool3d.cu` [1 pull requests, 3 comments, 3 participants]