Commit 9b40177
committed
Optimizes attention mask handling with boolean dtype
Replaces float-based attention mask operations with boolean dtype for improved memory efficiency and cleaner logic.
Removes unnecessary dtype conversion and simplifies mask creation by using boolean tensors directly instead of converting comparison results to float values.1 parent a0d6ee5 commit 9b40177
File tree
1 file changed
+3
-5
lines changed- flash_dmattn/integrations
1 file changed
+3
-5
lines changedLines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
107 | 105 | | |
108 | 106 | | |
109 | 107 | | |
| |||
0 commit comments