Preserve BatchNorm running state in composable quantizer#21056
Preserve BatchNorm running state in composable quantizer#21056denizkilinc wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21056
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 1 New Failure, 1 Cancelled Job, 1 Unrelated FailureAs of commit b0fcdc3 with merge base 667c91b ( NEW FAILURE - The following job has failed:
CANCELLED JOB - The following job was cancelled. Please retry:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
|
@denizkilinc has exported this pull request. If you are a Meta employee, you can view the originating Diff in D112989631. |
|
|
This PR needs a
|
|
/easycla |
fc10724 to
7b0a3ba
Compare
Summary: Quantization-aware training with the composable `PatternQuantizer` incorrectly observed BatchNorm affine parameters and running-state buffers as activation inputs. The inserted fake-quant nodes broke the connection between `aten.batch_norm.default` and the registered `running_mean` and `running_var` buffers, so training used batch statistics while evaluation consumed stale running statistics. Keep `aten.batch_norm.default` arguments 1-4 directly connected to registered state by excluding them from activation observation while retaining activation and output quantization. Add Arm and Sleep/ModAI regression tests that verify the state operands remain registered and the running statistics update during QAT. Differential Revision: D112989631
7b0a3ba to
b0fcdc3
Compare
rascani
left a comment
There was a problem hiding this comment.
LGTM, but you'll need to sign EasyCLA. Let me know if you need any help with that.
|
@rascani thank you for the review. I signed EasyCLA, now waiting for approval. If don't get approval today, I'll let you know. |
Summary:
Quantization-aware training with the composable
PatternQuantizerincorrectly observed BatchNorm affine parameters and running-state buffers as activation inputs. The inserted fake-quant nodes broke the connection betweenaten.batch_norm.defaultand the registeredrunning_meanandrunning_varbuffers, so training used batch statistics while evaluation consumed stale running statistics.Keep
aten.batch_norm.defaultarguments 1-4 directly connected to registered state by excluding them from activation observation while retaining activation and output quantization. Add Arm and Sleep/ModAI regression tests that verify the state operands remain registered and the running statistics update during QAT.Differential Revision: D112989631