Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/25160
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 7263efb with merge base e17e1a9 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@claude review effort=max |
|
Claude finished @rascani's task in 26m 8s —— View job Request changes: when Detailed reviewPR Review: #25160SummaryThe PR lowers eight Fused Quant activations to one One regression blocks approval: SiLU, HardSwish and HardSigmoid lose their portable fallback. The other findings cover test precision, assertions that can pass without testing anything, and small cleanups. Scope of this review:
Backward Compatibility
Testing
Code Quality
Performance
Specific Comments
RecommendationRequest Changes The SiLU/HardSwish/HardSigmoid fallback silently produces programs that can't load, for inputs such as a dynamic batch dim that worked before this PR. That breaks the documented portable-fallback contract. The fix is small: raise like
|
d6c427c to
e4ad26d
Compare
This PR needs a
|
|
@claude /pr-review Please review the current revision ( |
|
Claude finished @rascani's task in 39m 7s —— View job Claude finished @rascani's task —— The previous fallback blocker is fixed, but HardSwish/HardSigmoid fallbacks now leave unlifted Detailed review of
|
e4ad26d to
c642327
Compare
871d2f6 to
ffed2db
Compare
5ad1cc5 to
2beeec1
Compare
|
@claude review |
|
Claude finished @JakeStevens's task in 4m 38s —— View job The previous blockers are fixed and this review found no new correctness problems, but I'm asking for changes because the optimized-ESP-NN emulator jobs, the only CI that checks the new LUT kernel against ESP-NN, are failing on the current head and nobody has confirmed they're unrelated; the rest is minor coverage and API polish. Detailed review of
|
Lower sigmoid, tanh, GELU, SiLU, HardSwish, HardSigmoid, ReLU, and HardTanh (including ReLU6) to quantized_lut_int8. ESP-NN's logistic evaluation applies a generic 256-entry int8 lookup table, so the same kernel handles these elementwise activations. Evaluate each original FQ operator over every int8 input code at export, preserving its activation parameters, calibrated per-tensor qparams, and rounding. Store the table as a constant Tensor argument without scratch allocation. The native wrapper checks input, output, and table capacities and the vendor's element-count bound. Preserve SiLU, HardSwish, and HardSigmoid through local configurations of the existing shared OpQuantizer. Validation passed 249 Python tests, 24 S3 emulator tests, and scoped lint. Shared cases cover every int8 code, both GELU modes, custom clamp bounds, mixed float users, chains, saturation, serialization, and undersized-table rejection. Add and linear also exercise ReLU through the lookup operator. Authored with OpenAI Codex.
Return independent storage for scalar LUT outputs and lift constants introduced by activation decomposition before returning the transformed Edge program. This preserves the operator aliasing contract and makes HardSwish and HardSigmoid fallback graphs serializable. Validation: 69 LUT and pass-manager Python tests passed. The new scalar-alias and Edge-serialization regressions failed before these fixes. Scoped lint passed. Authored with OpenAI Codex.
|
@claude re-review |
|
Claude finished @rascani's task in 4m 21s —— View job This re-review of Detailed review of
|
Exercise narrow int8 input and output ranges through portable fallback and serialization, and distinguish these from partially quantized sigmoid calls. Verify calibrated output grids for sigmoid, SiLU, HardSwish, and HardSigmoid. Authored with Codex.
Lower sigmoid, tanh, GELU, SiLU, HardSwish, HardSigmoid, ReLU and HardTanh, including ReLU6, to a shared quantized_lut_int8 operator. ESP-NN's logistic evaluation is a generic lookup, so these activations can run directly on int8 tensors.
Export evaluates the FQ operator over all 256 input codes, preserving per-tensor qparams, activation parameters and rounding. Each table is a 256-byte constant Tensor with no scratch allocation or runtime preparation. LowerToEsp accepts static contiguous int8 inputs, and the wrapper checks capacities and the vendor element-count bound.
Unsupported activations use shared Fused Quant decomposition and its core ATen fallbacks. This PR introduces no backend-specific activation decomposition pass; scalar normalization, Edge replacement and constant handling are supplied by the shared-pipeline layer.
Validation: 75 LUT and linear host cases passed at this layer, including exhaustive input-code comparisons, dynamic and partially quantized fallback, mixed convolution/scratch graphs and serialized LUT-call counts. The wrapper retains its existing optimized-S3 table-capacity rejection coverage.
Authored with OpenAI Codex.