已合并
fix_dynamo_symbolic_hint_bug #36392
Ambi创建于 5月21日
fix_dynamo_symbolic_hint_bug #36392
已合并
从已删除 :v2.12.0合入到Ascend/pytorchv2.12.0
共 2 个文件变更+2-2
| @@ -29,7 +29,7 @@ class TestRunWithRngState(TestUtils): | |||
| 29 | 29 | ||
| 30 | return res1, res2 | 30 | return res1, res2 |
| 31 | 31 | ||
| 32 | - @parametrize("shape", [(10,)]) | 32 | + @parametrize("shape", [(20,)]) |
| 33 | 33 | ||
| 34 | def test_rng_state_with_compile(self, shape, dtype): | 34 | def test_rng_state_with_compile(self, shape, dtype): |
| 35 | device = "npu" | 35 | device = "npu" |
| @@ -658,7 +658,7 @@ class NPUIndexTritonKernel(TritonKernel): | |||
| 658 | else: | 658 | else: |
| 659 | numel_expr = node.expr.subs({sympy_index_symbol(r.name): r.numel for r in self.range_trees}) | 659 | numel_expr = node.expr.subs({sympy_index_symbol(r.name): r.numel for r in self.range_trees}) |
| 660 | 660 | ||
| 661 | - numel_expr = V.graph.sizevars.symbolic_hint(numel_expr) | 661 | + numel_expr = V.graph.sizevars.to_symint_or_int(numel_expr) |
| 662 | 662 | ||
| 663 | size_hints.append(numel_expr) | 663 | size_hints.append(numel_expr) |
| 664 | return size_hints | 664 | return size_hints |