Skip to content

Commit 0faa31d

Browse files
committed
Update base for Update on "Enable aoti for preprocess"
Update torch nightly pin to 11/01 after: pytorch/pytorch#137063 Test Plan: With pytorch/pytorch#137063: ``` pytest -c /dev/null -v -n auto examples/models/llama3_2_vision/preprocess/ ``` [ghstack-poisoned]
1 parent 0556995 commit 0faa31d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/models/llama3_2_vision/preprocess/test_preprocess.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def run_preprocess(
237237
image_tensor, inscribed_size, best_resolution
238238
)
239239
eager_ar = eager_ar.tolist()
240-
assert torch.allclose(reference_image, eager_image, rtol=1e-4, atol=1e-4)
240+
assert_expected(eager_image, reference_image, rtol=0, atol=1e-4)
241241
assert (
242242
reference_ar == eager_ar
243243
), f"Eager model: expected {reference_ar} but got {eager_ar}"
@@ -248,7 +248,7 @@ def run_preprocess(
248248
image_tensor, inscribed_size, best_resolution
249249
)
250250
exported_ar = exported_ar.tolist()
251-
assert torch.allclose(reference_image, exported_image, rtol=1e-4, atol=1e-4)
251+
assert_expected(exported_image, reference_image, rtol=0, atol=1e-4)
252252
assert (
253253
reference_ar == exported_ar
254254
), f"Exported model: expected {reference_ar} but got {exported_ar}"
@@ -259,7 +259,7 @@ def run_preprocess(
259259
et_image, et_ar = executorch_module.forward(
260260
(image_tensor, inscribed_size, best_resolution)
261261
)
262-
assert torch.allclose(reference_image, et_image, rtol=1e-4, atol=1e-4)
262+
assert_expected(et_image, reference_image, rtol=0, atol=1e-4)
263263
assert (
264264
reference_ar == et_ar.tolist()
265265
), f"Executorch model: expected {reference_ar} but got {et_ar.tolist()}"

0 commit comments

Comments
 (0)