From 8b5152654b712ed944a702feff1767b73d608f0f Mon Sep 17 00:00:00 2001 From: Cookiee235 Date: Thu, 27 Jun 2024 16:15:33 +0800 Subject: [PATCH] Update test_transform_dead_code_elimination.py Fix the wrong Relax IR construction --- tests/python/relax/test_transform_dead_code_elimination.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/python/relax/test_transform_dead_code_elimination.py b/tests/python/relax/test_transform_dead_code_elimination.py index 0cb0d4624731..142faf51607b 100644 --- a/tests/python/relax/test_transform_dead_code_elimination.py +++ b/tests/python/relax/test_transform_dead_code_elimination.py @@ -454,7 +454,7 @@ def main( R.output(lv0) gv_x = R.astype(x, dtype="float16") - gv_w = R.astype(x, dtype="float16") + gv_w = R.astype(w, dtype="float16") with R.dataflow(): lv1: R.Tensor((2, 28, 28, 3), dtype="float16") = R.permute_dims( @@ -481,7 +481,7 @@ def main( w: R.Tensor((4, 3, 3, 3), dtype="float32"), ): gv_x = R.astype(x, dtype="float16") - gv_w = R.astype(x, dtype="float16") + gv_w = R.astype(w, dtype="float16") with R.dataflow(): lv1: R.Tensor((2, 28, 28, 3), dtype="float16") = R.permute_dims(