未验证 提交 d7673e2f 编写于 作者: H HongyuJia 提交者: GitHub

[Tensor API & Prim-Relevant] Unsupport prob Tensor API (#50756)

* change phi tensor_gen->tensor_operants_gen

* [Tensor API] Support multiple Tensor C++ api

* [Tensor API] Unsupport prob Tensor API

* accept reviewers comment of #50731

* delete tensor_api.yaml
上级 4e417409
...@@ -93,7 +93,7 @@ set(tmp_eager_tensor_operants_h_path ${eager_tensor_operants_h_path}.tmp) ...@@ -93,7 +93,7 @@ set(tmp_eager_tensor_operants_h_path ${eager_tensor_operants_h_path}.tmp)
set(tmp_static_tensor_operants_cc_path ${static_tensor_operants_cc_path}.tmp) set(tmp_static_tensor_operants_cc_path ${static_tensor_operants_cc_path}.tmp)
set(tmp_static_tensor_operants_h_path ${static_tensor_operants_h_path}.tmp) set(tmp_static_tensor_operants_h_path ${static_tensor_operants_h_path}.tmp)
set(tensor_api_yaml_path set(tensor_api_yaml_path
${PADDLE_SOURCE_DIR}/paddle/phi/api/yaml/tensor_api.yaml) ${PADDLE_SOURCE_DIR}/paddle/phi/api/yaml/tensor_operants.yaml)
message("Prim tensor operants code generator") message("Prim tensor operants code generator")
execute_process( execute_process(
......
...@@ -694,7 +694,6 @@ class PADDLE_API Tensor final { ...@@ -694,7 +694,6 @@ class PADDLE_API Tensor final {
Tensor max(const IntArray& axis, bool keepdim) const; Tensor max(const IntArray& axis, bool keepdim) const;
Tensor maximum(const Tensor& y) const; Tensor maximum(const Tensor& y) const;
Tensor minimum(const Tensor& y) const; Tensor minimum(const Tensor& y) const;
Tensor prod(const IntArray& dims, bool keep_dim, bool reduce_all) const;
Tensor scale(const Scalar& scale, float bias, bool bias_after_scale) const; Tensor scale(const Scalar& scale, float bias, bool bias_after_scale) const;
Tensor sum(const IntArray& axis, DataType dtype, bool keepdim) const; Tensor sum(const IntArray& axis, DataType dtype, bool keepdim) const;
Tensor tile(const IntArray& repeat_times) const; Tensor tile(const IntArray& repeat_times) const;
......
...@@ -99,7 +99,7 @@ set(wrapped_infermeta_source_file ...@@ -99,7 +99,7 @@ set(wrapped_infermeta_source_file
# tensor and tensor operants file # tensor and tensor operants file
set(tensor_api_yaml_path set(tensor_api_yaml_path
${CMAKE_SOURCE_DIR}/paddle/phi/api/yaml/tensor_api.yaml) ${CMAKE_SOURCE_DIR}/paddle/phi/api/yaml/tensor_operants.yaml)
set(tensor_gen_file set(tensor_gen_file
${CMAKE_SOURCE_DIR}/paddle/phi/api/yaml/generator/tensor_operants_gen.py) ${CMAKE_SOURCE_DIR}/paddle/phi/api/yaml/generator/tensor_operants_gen.py)
set(operants_base_file set(operants_base_file
......
...@@ -617,7 +617,7 @@ def main(): ...@@ -617,7 +617,7 @@ def main():
parser.add_argument( parser.add_argument(
'--tensor_api_yaml_path', '--tensor_api_yaml_path',
help='path to tensor_api yaml file', help='path to tensor_api yaml file',
default='paddle/phi/api/yaml/tensor_api.yaml', default='paddle/phi/api/yaml/tensor_operants.yaml',
) )
options = parser.parse_args() options = parser.parse_args()
......
# Attach operants to Tensor, this file should be consistent with the declaration in `tensor.h`
- unsqueeze - unsqueeze
- pow - pow
- exp - exp
...@@ -17,7 +18,6 @@ ...@@ -17,7 +18,6 @@
- max - max
- maximum - maximum
- minimum - minimum
- prod
- roll - roll
- scatter - scatter
- scatter_nd_add - scatter_nd_add
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册