Commit 31c4afe
Static attention: do not specialize on input sequence length (pytorch#13373)
Summary:
Hardcode embedding/head dims which are fixed and use -1 for the sequence length dimension when reshaping, this allows us to quantize the graph once and export it to different sequence lengths.
Differential Revision: D801810121 parent 9cfb684 commit 31c4afe
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
762 | | - | |
| 762 | + | |
763 | 763 | | |
764 | 764 | | |
765 | 765 | | |
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
772 | | - | |
773 | | - | |
| 771 | + | |
774 | 772 | | |
775 | 773 | | |
776 | 774 | | |
| |||
800 | 798 | | |
801 | 799 | | |
802 | 800 | | |
803 | | - | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
804 | 804 | | |
805 | | - | |
| 805 | + | |
806 | 806 | | |
807 | 807 | | |
808 | 808 | | |
| |||
0 commit comments