Skip to content

Commit f2b6012

Browse files
committed
fix lint:
Signed-off-by: ganyi <[email protected]>
1 parent b9282d4 commit f2b6012

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/e2e/singlecard/ops/test_rotary_embedding.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,12 @@ def forward(
248248
o = self.o_proj(query)
249249
return o
250250

251+
251252
# The first graph seems will have some accuracy issue when directly run pytest on the ops folder,
252253
# add a warmup graph replay for workaround
253254
ACL_GRPAH_FIRST_RUN = True
255+
256+
254257
@pytest.mark.parametrize("is_neox_style", IS_NEOX_STYLE)
255258
@pytest.mark.parametrize("num_tokens", BATCH_SIZES)
256259
@pytest.mark.parametrize("num_heads", NUM_HEADS)
@@ -330,10 +333,10 @@ def custom_op_checking_backend(gm: torch.fx.GraphModule, example_input):
330333
static_hidden_states.copy_(random_filled_hidden_states)
331334

332335
aclgraph.replay()
333-
aclgraph.replay()
336+
global ACL_GRPAH_FIRST_RUN
334337
if ACL_GRPAH_FIRST_RUN:
335338
ACL_GRPAH_FIRST_RUN = False
336-
return
339+
return
337340
output_reference = model(static_positions, static_hidden_states)
338341
torch.testing.assert_close(static_output,
339342
output_reference,

0 commit comments

Comments
 (0)