Skip to content

Commit 4af2c24

Browse files
committed
Use assert_close
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
1 parent 3fd9963 commit 4af2c24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extension/llm/modules/test/test_attention.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ def test_attention_aoti(self):
167167
path = package_aoti(os.path.join(tempdir, "mha.pt2"), so)
168168
mha_aoti = load_package(path)
169169

170-
et_res = mha_aoti(self.x, self.x, input_pos=self.input_pos)
170+
aoti_res = mha_aoti(self.x, self.x, input_pos=self.input_pos)
171171
tt_res = self.tt_mha(self.x, self.x, input_pos=self.input_pos)
172-
self.assertTrue(torch.allclose(et_res, tt_res))
172+
assert_close(aoti_res, tt_res)
173173

174174
def test_attention_executorch(self):
175175
# Self attention.

0 commit comments

Comments
 (0)