From ed17c4f7170a32d09dfc0aa9da9de13a308f5c7d Mon Sep 17 00:00:00 2001 From: txyugood Date: Wed, 28 Jun 2023 11:36:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E5=88=99=E8=BD=AC=E6=8D=A2=20No.234/2?= =?UTF-8?q?36/237=20fix=20conflict?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- paconvert/api_mapping.json | 1 + paconvert/api_matcher.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/paconvert/api_mapping.json b/paconvert/api_mapping.json index 27f13f09e..f36d420db 100644 --- a/paconvert/api_mapping.json +++ b/paconvert/api_mapping.json @@ -8751,6 +8751,7 @@ "dataset", "indices" ] + }, "torch.utils.cpp_extension.CUDA_HOME": { "Matcher": "GenericMatcher", "paddle_api": "paddle.utils.cpp_extension.cpp_extension.CUDA_HOME" diff --git a/paconvert/api_matcher.py b/paconvert/api_matcher.py index 46418f167..f83899f37 100644 --- a/paconvert/api_matcher.py +++ b/paconvert/api_matcher.py @@ -3752,6 +3752,8 @@ def get_paddle_nodes(self, args, kwargs): code = "{}({})".format(self.get_paddle_api(), code) node = ast.parse(code.strip("\n")).body return node + + class TensorFunc2PaddleFunc(BaseMatcher): def generate_code(self, kwargs):