Duplicate cat if sandwiched between deq/quant (#19925)#19925
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19925
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 15 PendingAs of commit 7bd12f9 with merge base b63adec ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@DrJessop has exported this pull request. If you are a Meta employee, you can view the originating Diff in D107174424. |
This PR needs a
|
1f11fca to
c826de9
Compare
Summary:
Suppose we have (int_data -> dq, fp32_data) -> cat -> (slice, q)
This is a case with a multi-user cat. If we duplicated the cat, we would have
(int_data -> dq, fp32_data) -> (cat -> slice, cat -> q)
Then, in one of our chains, we could push the q above its cat. This allows for us to at least keep one chain using quantized math the whole way instead of forcing a break to fp32 in both chains.
Example {F1990607611}. Just suppose that we already hoisted the quant node to be right underneath the cat.
In a later pass, will hoist quant under single-user cat above the cat. This pass only duplicates the cat for each quant op user which has independent quant params.
Reviewed By: mcremon-meta
Differential Revision: D107174424
Summary:
Suppose we have (int_data -> dq, fp32_data) -> cat -> (slice, q)
This is a case with a multi-user cat. If we duplicated the cat, we would have
(int_data -> dq, fp32_data) -> (cat -> slice, cat -> q)
Then, in one of our chains, we could push the q above its cat. This allows for us to at least keep one chain using quantized math the whole way instead of forcing a break to fp32 in both chains.
Example {F1990607611}. Just suppose that we already hoisted the quant node to be right underneath the cat.
In a later pass, will hoist quant under single-user cat above the cat. This pass only duplicates the cat for each quant op user which has independent quant params.
Reviewed By: mcremon-meta
Differential Revision: D107174424
c826de9 to
56bfbdb
Compare
Summary:
Suppose we have (int_data -> dq, fp32_data) -> cat -> (slice, q)
This is a case with a multi-user cat. If we duplicated the cat, we would have
(int_data -> dq, fp32_data) -> (cat -> slice, cat -> q)
Then, in one of our chains, we could push the q above its cat. This allows for us to at least keep one chain using quantized math the whole way instead of forcing a break to fp32 in both chains.
Example {F1990607611}. Just suppose that we already hoisted the quant node to be right underneath the cat.
In a later pass, will hoist quant under single-user cat above the cat. This pass only duplicates the cat for each quant op user which has independent quant params.
Reviewed By: mcremon-meta
Differential Revision: D107174424
Summary:
Suppose we have (int_data -> dq, fp32_data) -> cat -> (slice, q)
This is a case with a multi-user cat. If we duplicated the cat, we would have
(int_data -> dq, fp32_data) -> (cat -> slice, cat -> q)
Then, in one of our chains, we could push the q above its cat. This allows for us to at least keep one chain using quantized math the whole way instead of forcing a break to fp32 in both chains.
Example {F1990607611}. Just suppose that we already hoisted the quant node to be right underneath the cat.
In a later pass, will hoist quant under single-user cat above the cat. This pass only duplicates the cat for each quant op user which has independent quant params.
Reviewed By: mcremon-meta
Differential Revision: D107174424
Summary:
Suppose we have (int_data -> dq, fp32_data) -> cat -> (slice, q)
This is a case with a multi-user cat. If we duplicated the cat, we would have
(int_data -> dq, fp32_data) -> (cat -> slice, cat -> q)
Then, in one of our chains, we could push the q above its cat. This allows for us to at least keep one chain using quantized math the whole way instead of forcing a break to fp32 in both chains.
Example {F1990607611}. Just suppose that we already hoisted the quant node to be right underneath the cat.
In a later pass, will hoist quant under single-user cat above the cat. This pass only duplicates the cat for each quant op user which has independent quant params.
Reviewed By: mcremon-meta
Differential Revision: D107174424
56bfbdb to
7bd12f9
Compare
Differential Revision: D107174424 Pull Request resolved: #19925
Summary:
Suppose we have (int_data -> dq, fp32_data) -> cat -> (slice, q)
This is a case with a multi-user cat. If we duplicated the cat, we would have
(int_data -> dq, fp32_data) -> (cat -> slice, cat -> q)
Then, in one of our chains, we could push the q above its cat. This allows for us to at least keep one chain using quantized math the whole way instead of forcing a break to fp32 in both chains.
Example {F1990607611}. Just suppose that we already hoisted the quant node to be right underneath the cat.
In a later pass, will hoist quant under single-user cat above the cat. This pass only duplicates the cat for each quant op user which has independent quant params.
Reviewed By: mcremon-meta
Differential Revision: D107174424