← Back to events
ActiveAIRelease

viable/strict/1789065007: [BE] Unify reflection/replication padding shape checks (#196457)

What happened

Similar to the pooling input validation unification ( #196230 ), the six pad ops hand-wrote the same shape checks in a dozen places across CPU, CUDA and MPS, and the copies had drifted. Collect them in Padding.h next to the existing check_valid_input, parameterized by rank and by whether the caller is reflection padding, and route every backend through them. All three now report identical errors, matching the alread…

Summary assembled by rule from the sources below

Why it's spreading

Sources