已开启
test(dynamo): cover assume_constant_result on NPU #42033
test(dynamo): cover assume_constant_result on NPU #42033
已开启
2501_93637465创建于 7月18日
1 个文件变更+18-0
@@ -0,0 +1,18 @@
1+diff --git a/test/dynamo/test_decorators.py b/test/dynamo/test_decorators.py
2+index a1014af..d195e45 100644
3+--- a/test/dynamo/test_decorators.py
4++++ b/test/dynamo/test_decorators.py
5+@@ -1427 +1427 @@ class DecoratorTests(PytreeRegisteringTestCase):
6+- return torch.full([n], s)
7++ return torch.full([n], s).npu()
8+@@ -1436 +1436 @@ class DecoratorTests(PytreeRegisteringTestCase):
9+- B = torch.tensor(B_list, dtype=torch.int32)
10++ B = torch.tensor(B_list, dtype=torch.int32).npu()
11+@@ -1458,2 +1458,2 @@ 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()
16+@@ -1495 +1495 @@ class DecoratorTests(PytreeRegisteringTestCase):
17+- x = torch.tensor([1.0, 2.0, 3.0])
18++ x = torch.tensor([1.0, 2.0, 3.0]).npu()