aoti diag: functional none-gate
Browse files
app.py
CHANGED
|
@@ -483,8 +483,9 @@ def aoti_diag() -> str:
|
|
| 483 |
return vsa_h3.sparse_attention(q, k, v, None if gate_h is None else gate_h.transpose(1, 2), geometry)
|
| 484 |
|
| 485 |
def functional(gate_h):
|
|
|
|
| 486 |
return aoti_attention.sparse_attention_functional(
|
| 487 |
-
q.transpose(1, 2), k.transpose(1, 2), v.transpose(1, 2),
|
| 488 |
geometry.untile_index, geometry.variable_block_sizes, geometry.tile_divisor,
|
| 489 |
geometry.topk, geometry.num_prefix_tiles,
|
| 490 |
)
|
|
|
|
| 483 |
return vsa_h3.sparse_attention(q, k, v, None if gate_h is None else gate_h.transpose(1, 2), geometry)
|
| 484 |
|
| 485 |
def functional(gate_h):
|
| 486 |
+
gate_t = None if gate_h is None else gate_h.transpose(1, 2)
|
| 487 |
return aoti_attention.sparse_attention_functional(
|
| 488 |
+
q.transpose(1, 2), k.transpose(1, 2), v.transpose(1, 2), gate_t,
|
| 489 |
geometry.untile_index, geometry.variable_block_sizes, geometry.tile_divisor,
|
| 490 |
geometry.topk, geometry.num_prefix_tiles,
|
| 491 |
)
|