Skip to content

Commit 2d60e27

Browse files
committed
test: remove unused rotary embeddings in SFA tests
Updates SFA v1 unit tests to no longer initialize `cos` and `sin` tensors. These values are not required for the tested scenarios, so they are now set to `None` to simplify the test setup. Signed-off-by: Yizhou Liu <[email protected]>
1 parent 54de084 commit 2d60e27

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/ut/attention/test_sfa_v1.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ def test_ascend_sfa_metadata_builder_build(self):
124124
common_attn_metadata.attn_mask = None
125125
common_attn_metadata.attn_state = AscendAttentionState.ChunkedPrefill
126126
common_attn_metadata.block_table_tensor = torch.randn(100, 4)
127-
common_attn_metadata.cos = torch.ones(256, 1, 1, 64)
128-
common_attn_metadata.sin = torch.zeros(256, 1, 1, 64)
127+
common_attn_metadata.cos = None
128+
common_attn_metadata.sin = None
129129
common_attn_metadata.num_input_tokens = 100
130130

131131
model = MagicMock()
@@ -169,8 +169,8 @@ def test_ascend_sfa_metadata_builder_build_for_graph_capture(self):
169169
common_attn_metadata.attn_mask = None
170170
common_attn_metadata.attn_state = AscendAttentionState.ChunkedPrefill
171171
common_attn_metadata.block_table_tensor = torch.randn(100, 4)
172-
common_attn_metadata.cos = torch.ones(256, 1, 1, 64)
173-
common_attn_metadata.sin = torch.zeros(256, 1, 1, 64)
172+
common_attn_metadata.cos = None
173+
common_attn_metadata.sin = None
174174
common_attn_metadata.num_input_tokens = 100
175175

176176
model = MagicMock()

0 commit comments

Comments
 (0)