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):