已开启
test(dynamo): cover assume_constant_result on NPU #42035
test(dynamo): cover assume_constant_result on NPU #42035
已开启
2501_93637465创建于 7月18日
1 个文件变更+13-5
@@ -1,11 +1,19 @@
1diff --git a/test/dynamo/test_decorators.py b/test/dynamo/test_decorators.py1diff --git a/test/dynamo/test_decorators.py b/test/dynamo/test_decorators.py
2-index 6842345..b39a435 1006442+index 6842345..6c51b74 100644
3--- a/test/dynamo/test_decorators.py3--- a/test/dynamo/test_decorators.py
4+++ b/test/dynamo/test_decorators.py4+++ b/test/dynamo/test_decorators.py
5-@@ -1,3 +1,6 @@5+@@ -0,0 +1,3 @@
6+import torch_npu6+import torch_npu
7+from torch_npu.contrib import transfer_to_npu7+from torch_npu.contrib import transfer_to_npu
8+8+
9- # Owner(s): ["module: dynamo"]9+@@ -1155 +1158 @@ If the above doesn't work, please subtmit an issue to GitHub.
10- import functools10+- return torch.full([n], s)
11- import operator11++ return torch.full([n], s).npu()
12+@@ -1164 +1167 @@ If the above doesn't work, please subtmit an issue to GitHub.
13+- B = torch.tensor(B_list, dtype=torch.int32)
14++ B = torch.tensor(B_list, dtype=torch.int32).npu()
15+@@ -1185,2 +1188,2 @@ If the above doesn't work, please subtmit an issue to GitHub.
16+- y = torch.tensor([1])
17+- x = torch.tensor(1)
18++ y = torch.tensor([1]).npu()
19++ x = torch.tensor(1).npu()