Uh oh!
There was an error while loading. Please reload this page.
Fold DyT alpha scalar into tanh LUT (#21952) - #21952
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21952
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit bd9715a with merge base fbd4bbf ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@cgreenberg has exported this pull request. If you are a Meta employee, you can view the originating Diff in D116560649. |
|
9501798 to
5414367Compare
|
Uh oh!
There was an error while loading. Please reload this page.
5414367 to
54b33a0Compare54b33a0 to
0cec5b5Comparecgreenberg
commented
Aug 20, 2026
@pytorchbot label "release notes: arm" |
cgreenberg
commented
Aug 20, 2026
/easycla |
digantdesai
commented
Aug 20, 2026
@claude review this PR. |
Claude finished @digantdesai's task in 12m 7s —— View job Code Review: Fold DyT alpha scalar into tanh LUT
Reviewed all four changed files plus the surrounding machinery ( Correctness — looks solid
Minor concerns / questions
Nits
CIThe 2 reported failures ( Nice work — the exhaustive parity test against the reference model is exactly the right safety net for a byte-exact rewrite like this. My only substantive ask is confirming the alpha buffer doesn't linger (#1). |
2c45117 to
0afdc7fCompareSummary: Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation. The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change. Differential Revision: D116560649
36972b2 to
f26c476CompareSummary: Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation. The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change. Differential Revision: D116560649
Summary: Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation. The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change. Differential Revision: D116560649
f26c476 to
78cde72CompareSummary: Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation. The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change. Differential Revision: D116560649
Summary: Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation. The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change. Differential Revision: D116560649
78cde72 to
d5a4883Comparecgreenberg
commented
Aug 21, 2026
@claude review this PR |
rascani
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
Summary: Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation. The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change. Reviewed By: rascani Differential Revision: D116560649
d5a4883 to
21d6474CompareSummary: Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation. The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change. Reviewed By: rascani Differential Revision: D116560649
21d6474 to
1f56c76CompareSummary: Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation. The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change. Reviewed By: rascani Differential Revision: D116560649
Summary: Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation. The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change. Reviewed By: rascani Differential Revision: D116560649
654c3cd to
e45f3afCompareSummary: Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation. The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change. Reviewed By: rascani Differential Revision: D116560649
e45f3af to
bd9715aCompareSummary: Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation. The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change. Reviewed By: rascani Differential Revision: D116560649
Summary: Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation. The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change. Reviewed By: rascani Differential Revision: D116560649
Summary: Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation. The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change. Reviewed By: rascani Differential Revision: D116560649
Summary: Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation. The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change. Reviewed By: rascani Differential Revision: D116560649
Summary: Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation. The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change. Reviewed By: rascani Differential Revision: D116560649
Summary: Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation. The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change. Reviewed By: rascani Differential Revision: D116560649
Uh oh!
There was an error while loading. Please reload this page.
Summary:
Dynamic Tanh (DyT) normalization computes tanh(alpha * x) with a learned scalar alpha. Quantized, that lowers to a full-tensor integer Mul followed by a tanh TABLE. This adds FoldDyTAlphaIntoLUTPass, which replays the exact TOSA SINGLE_ROUND integer arithmetic over all 256 int8 codes and folds the alpha Mul into the TABLE without approximation.
The matcher fails closed for unsupported shapes, ranges, layouts, or quantization metadata. This revision contains only the public pass implementation, tests, and package exports; pass registration is intentionally outside this public change.
Reviewed By: rascani
Differential Revision: D116560649