From 7e90b888f6955dac55977cb8ada377f4848b1852 Mon Sep 17 00:00:00 2001 From: WSs_321 Date: Thu, 31 Jul 2025 02:08:28 +0000 Subject: [PATCH 1/3] update torch_npu/testing/testcase.py. Signed-off-by: WSs_321 --- torch_npu/testing/testcase.py | 1 + 1 file changed, 1 insertion(+) diff --git a/torch_npu/testing/testcase.py b/torch_npu/testing/testcase.py index 487420f6b00..c739d0ae82c 100644 --- a/torch_npu/testing/testcase.py +++ b/torch_npu/testing/testcase.py @@ -522,3 +522,4 @@ class TestCase(expecttest.TestCase): if baseline is None or runtime < baseline * 0.9: PerfBaseline.set_baseline(methodId, runtime) +# test \ No newline at end of file -- Gitee From 618c23fa1d4f7deb7cb2ba2fd5ea39507246736b Mon Sep 17 00:00:00 2001 From: WSs_321 Date: Sun, 17 Aug 2025 07:56:59 +0000 Subject: [PATCH 2/3] update test/npu/test_jit_script.py. Signed-off-by: WSs_321 --- test/npu/test_jit_script.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/npu/test_jit_script.py b/test/npu/test_jit_script.py index 1c96265eb9a..026ce43cbc9 100644 --- a/test/npu/test_jit_script.py +++ b/test/npu/test_jit_script.py @@ -86,6 +86,7 @@ class TestJitTrace(TestCase): output2 = script_model(x, r1, r2) self.assertRtolEqual(output1, output2) - +#test if __name__ == '__main__': run_tests() +#test \ No newline at end of file -- Gitee From dcd97bd3e9aa2f73fb184b82e55a8e946bf226da Mon Sep 17 00:00:00 2001 From: WSs_321 Date: Sun, 17 Aug 2025 08:02:21 +0000 Subject: [PATCH 3/3] update torch_npu/onnx/wrapper_ops_combined.py. Signed-off-by: WSs_321 --- torch_npu/onnx/wrapper_ops_combined.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/torch_npu/onnx/wrapper_ops_combined.py b/torch_npu/onnx/wrapper_ops_combined.py index aee88fa11b7..9a844c69f3d 100644 --- a/torch_npu/onnx/wrapper_ops_combined.py +++ b/torch_npu/onnx/wrapper_ops_combined.py @@ -1,11 +1,9 @@ -import torch + import torch_npu from torch_npu.utils._error_code import ErrCode, pta_error - +import torch __all__ = [] - - class _NPULinearOP(object): @staticmethod @@ -14,9 +12,7 @@ class _NPULinearOP(object): return torch._C._nn.linear(input_, weight, bias) return torch.ops.npu.npu_linear(input_, weight, bias) - class _NPUTransposeOP(object): - @staticmethod def forward(self, perm, require_contiguous=True, out=None): if torch.onnx.is_in_onnx_export(): @@ -28,8 +24,6 @@ class _NPUTransposeOP(object): out = torch.ops.npu.npu_transpose( self, perm, require_contiguous) return out - - class _NPUBroadcastOP(object): @staticmethod -- Gitee