From 6fc5b7a5134176163e86a25cdbbf42e1fa96a702 Mon Sep 17 00:00:00 2001 From: JZ-LIANG Date: Wed, 28 Jun 2023 15:39:29 +0800 Subject: [PATCH] revert bug deps (#54901) --- paddle/phi/api/yaml/generator/api_base.py | 13 ------------- paddle/phi/api/yaml/generator/api_gen.py | 2 -- 2 files changed, 15 deletions(-) diff --git a/paddle/phi/api/yaml/generator/api_base.py b/paddle/phi/api/yaml/generator/api_base.py index c15dded80da..24f77bce383 100644 --- a/paddle/phi/api/yaml/generator/api_base.py +++ b/paddle/phi/api/yaml/generator/api_base.py @@ -1278,17 +1278,6 @@ PADDLE_API {self.get_return_type(inplace_flag=True)} {api_func_name}({self.get_d }} """ - def gen_dist_tensor_code(self): - # define the DistTensorSpec vector for input and output tensors - api_code = " \n std::vector input_specs;\n" - - # get DistTensorSpec for each input tensor - for tensor_name in self.inputs['names']: - api_code += f" input_specs.emplace_back(paddle::distributed::auto_parallel::DistTensorSpec({tensor_name}));\n" - api_code += "\n" - - return api_code - def gene_base_api_code(self, inplace_flag=False): api_func_name = self.get_api_func_name() if inplace_flag and api_func_name[-1] != '_': @@ -1297,8 +1286,6 @@ PADDLE_API {self.get_return_type(inplace_flag=True)} {api_func_name}({self.get_d PADDLE_API {self.get_return_type(inplace_flag)} {api_func_name}({self.get_define_args(inplace_flag)}) {{ {self.gene_kernel_select()} """ - # if api_func_name == 'matmul': - # api_code += self.gen_dist_tensor_code() if len(self.kernel['func']) > 1: kernel_dispatch_code = '' diff --git a/paddle/phi/api/yaml/generator/api_gen.py b/paddle/phi/api/yaml/generator/api_gen.py index 7c7109859e0..71285de7b24 100644 --- a/paddle/phi/api/yaml/generator/api_gen.py +++ b/paddle/phi/api/yaml/generator/api_gen.py @@ -379,8 +379,6 @@ def source_include(header_file_path): #include "paddle/phi/api/profiler/event_tracing.h" #include "paddle/phi/api/profiler/supplement_tracing.h" -#include "paddle/fluid/distributed/auto_parallel/spmd_rules/dist_tensor_spec.h" - DECLARE_bool(conv2d_disable_cudnn); DECLARE_int32(low_precision_op_list); """ -- GitLab