未验证 提交 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)
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(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")
execute_process(
......
......@@ -694,7 +694,6 @@ class PADDLE_API Tensor final {
Tensor max(const IntArray& axis, bool keepdim) const;
Tensor maximum(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 sum(const IntArray& axis, DataType dtype, bool keepdim) const;
Tensor tile(const IntArray& repeat_times) const;
......
......@@ -99,7 +99,7 @@ set(wrapped_infermeta_source_file
# tensor and tensor operants file
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
${CMAKE_SOURCE_DIR}/paddle/phi/api/yaml/generator/tensor_operants_gen.py)
set(operants_base_file
......
......@@ -617,7 +617,7 @@ def main():
parser.add_argument(
'--tensor_api_yaml_path',
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()
......
# Attach operants to Tensor, this file should be consistent with the declaration in `tensor.h`
- unsqueeze
- pow
- exp
......@@ -17,7 +18,6 @@
- max
- maximum
- minimum
- prod
- roll
- scatter
- scatter_nd_add
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册