已开启
test(dynamo): cover assume_constant_result on NPU #42032
2501_93637465创建于 7月18日
test(dynamo): cover assume_constant_result on NPU #42032
已开启
共 1 个文件变更+15-0
| @@ -0,0 +1,15 @@ | |||
| 1 | +diff --git a/test/dynamo/test_decorators.py b/test/dynamo/test_decorators.py | ||
| 2 | +index 58f5127..9a7a3fb 100644 | ||
| 3 | +--- a/test/dynamo/test_decorators.py | ||
| 4 | ++++ b/test/dynamo/test_decorators.py | ||
| 5 | +@@ -1415 +1415 @@ class DecoratorTests(PytreeRegisteringTestCase): | ||
| 6 | +- return torch.full([n], s) | ||
| 7 | ++ return torch.full([n], s).npu() | ||
| 8 | +@@ -1424 +1424 @@ class DecoratorTests(PytreeRegisteringTestCase): | ||
| 9 | +- B = torch.tensor(B_list, dtype=torch.int32) | ||
| 10 | ++ B = torch.tensor(B_list, dtype=torch.int32).npu() | ||
| 11 | + class DecoratorTests(PytreeRegisteringTestCase): | ||
| 12 | +- y = torch.tensor([1]) | ||
| 13 | +- x = torch.tensor(1) | ||
| 14 | ++ y = torch.tensor([1]).npu() | ||
| 15 | ++ x = torch.tensor(1).npu() | ||