Skip to content

Commit 22a8978

Browse files
authored
[Relax][BugFix] Fix a bug about the IR construction in test file (#17121)
Update test_transform_dead_code_elimination.py Fix the wrong Relax IR construction
1 parent 73078f1 commit 22a8978

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/python/relax/test_transform_dead_code_elimination.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ def main(
454454
R.output(lv0)
455455

456456
gv_x = R.astype(x, dtype="float16")
457-
gv_w = R.astype(x, dtype="float16")
457+
gv_w = R.astype(w, dtype="float16")
458458

459459
with R.dataflow():
460460
lv1: R.Tensor((2, 28, 28, 3), dtype="float16") = R.permute_dims(
@@ -481,7 +481,7 @@ def main(
481481
w: R.Tensor((4, 3, 3, 3), dtype="float32"),
482482
):
483483
gv_x = R.astype(x, dtype="float16")
484-
gv_w = R.astype(x, dtype="float16")
484+
gv_w = R.astype(w, dtype="float16")
485485

486486
with R.dataflow():
487487
lv1: R.Tensor((2, 28, 28, 3), dtype="float16") = R.permute_dims(

0 commit comments

Comments
 (0)