From 64e2421f6eef1fc52d45db325f43e1966f2d19b5 Mon Sep 17 00:00:00 2001 From: jim19930609 Date: Wed, 26 Jan 2022 11:53:15 +0000 Subject: [PATCH] Fixed minor issue --- .../final_state_generator/eager_gen.py | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/paddle/fluid/eager/auto_code_generator/final_state_generator/eager_gen.py b/paddle/fluid/eager/auto_code_generator/final_state_generator/eager_gen.py index 4c9372a0b6c..556e0f1b325 100644 --- a/paddle/fluid/eager/auto_code_generator/final_state_generator/eager_gen.py +++ b/paddle/fluid/eager/auto_code_generator/final_state_generator/eager_gen.py @@ -824,29 +824,11 @@ def GenerateForwardDefinition(fwd_api_name, bwd_api_name, return forward_function_str, forward_function_declaration_str -def FakeMatmulGradAPI(): - fake_matmul_grad_str = """ -namespace paddle { -namespace experimental { - std::vector> matmul_grad(const Tensor& x, - const Tensor& y, - const Tensor& out_grad, - bool transpose_x, - bool transpose_y) { - std::vector> ret; - return ret; - } -} -} - -""" - return fake_matmul_grad_str - - def GenerateNodeCCFile(filepath, node_definition_str): file_contents = """ #include "glog/logging.h" #include "paddle/pten/api/all.h" +#include "paddle/pten/api/backward/backward_api.h" #include "paddle/fluid/imperative/tracer.h" #include "paddle/fluid/framework/op_registry.h" #include "paddle/fluid/eager/utils.h" @@ -854,7 +836,6 @@ def GenerateNodeCCFile(filepath, node_definition_str): #include "paddle/fluid/eager/api/generated/eager_generated/backwards/nodes.h" """ - file_contents += FakeMatmulGradAPI() file_contents += node_definition_str with open(filepath, 'a') as f: f.write(file_contents) -- GitLab