Materialize zero bias for conv replacement (#23354) - #23354
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23354
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 1 PendingAs of commit 590bcaf with merge base 305638c ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pcwu0329 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D110672307. |
This PR needs a
|
Summary: Pull Request resolved: pytorch#23354 When replacing biasless `aten.convolution` with Cadence convolution, materialize an explicit zero bias tensor so strict Edge validation sees a schema-compatible Cadence conv. This keeps strict validation enabled for QAT compile paths that leave some backbone convolutions FP32. Differential Revision: D110672307
2d35485 to
ae663e1
Compare
Summary: When replacing biasless `aten.convolution` with Cadence convolution, materialize an explicit zero bias tensor so strict Edge validation sees a schema-compatible Cadence conv. This keeps strict validation enabled for QAT compile paths that leave some backbone convolutions FP32. Differential Revision: D110672307
ae663e1 to
ab5bd4b
Compare
Summary: Pull Request resolved: pytorch#23354 When replacing biasless `aten.convolution` with Cadence convolution, materialize an explicit zero bias tensor so strict Edge validation sees a schema-compatible Cadence conv. This keeps strict validation enabled for QAT compile paths that leave some backbone convolutions FP32. Differential Revision: D110672307
ab5bd4b to
254721d
Compare
Summary: When replacing biasless `aten.convolution` with Cadence convolution, materialize an explicit zero bias tensor so strict Edge validation sees a schema-compatible Cadence conv. This keeps strict validation enabled for QAT compile paths that leave some backbone convolutions FP32. Differential Revision: D110672307
254721d to
9d29ad9
Compare
Summary: Pull Request resolved: pytorch#23354 When replacing biasless `aten.convolution` with Cadence convolution, materialize an explicit zero bias tensor so strict Edge validation sees a schema-compatible Cadence conv. This keeps strict validation enabled for QAT compile paths that leave some backbone convolutions FP32. Differential Revision: D110672307
9d29ad9 to
b4a2fe6
Compare
Summary: `aten::convolution` declares `Tensor? bias`, so a conv built with `bias=False` lowers to a node whose bias argument is `None`. `cadence::conv1d/conv2d/conv3d` declare a non-optional `Tensor bias`, with no way to express absence. Replacing a biasless convolution therefore yields a node that strict Edge validation rejects for schema mismatch. Materialize an explicit zero bias via `edge.aten.full.default`, sized to the convolution's output channels and typed from the weight, so the replacement is schema-valid. Adding zeros is numerically a no-op. If the Cadence kernels gain optional-bias support, as discussed on the diff, this method can be deleted outright. Reviewed By: DrJessop Differential Revision: D110672307
b4a2fe6 to
1b65a46
Compare
Summary: Pull Request resolved: pytorch#23354 `aten::convolution` declares `Tensor? bias`, so a conv built with `bias=False` lowers to a node whose bias argument is `None`. `cadence::conv1d/conv2d/conv3d` declare a non-optional `Tensor bias`, with no way to express absence. Replacing a biasless convolution therefore yields a node that strict Edge validation rejects for schema mismatch. Materialize an explicit zero bias via `edge.aten.full.default`, sized to the convolution's output channels and typed from the weight, so the replacement is schema-valid. Adding zeros is numerically a no-op. If the Cadence kernels gain optional-bias support, as discussed on the diff, this method can be deleted outright. Reviewed By: DrJessop Differential Revision: D110672307
1b65a46 to
590bcaf
Compare
Summary:
aten::convolutiondeclaresTensor? bias, so a conv built withbias=Falselowers to a node whose bias argument isNone.cadence::conv1d/conv2d/conv3ddeclare a non-optionalTensor bias, with no way to express absence. Replacing a biasless convolution therefore yields a node that strict Edge validation rejects for schema mismatch.Materialize an explicit zero bias via
edge.aten.full.default, sized to the convolution's output channels and typed from the weight, so the replacement is schema-valid. Adding zeros is numerically a no-op.If the Cadence kernels gain optional-bias support, as discussed on the diff, this method can be deleted outright.
Reviewed By: DrJessop
Differential Revision: D110672307