Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete final state pre name #5191

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ def trace(x, offset=0, axis1=0, axis2=1, name=None):
```

动态图分支的写法一般是调用 C++ 算子对应的 Python C 函数,示例中调用名为 `trace` 的 算子,使用 `_C_ops.trace`,然后传入参数。

- `_C_ops` 是 [python/paddle/_C_ops.py](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/_C_ops.py),其实现了从 Paddle 编译得到的二进制文件中 import C++ 算子对应的 Python C 函数。
- `trace` 是算子的 Python C 函数名。Python C 函数的命名直接采用算子名。
- 参数 `( x, offset, axis1, axis2 )`需按照 [YAML 配置文件](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/phi/api/yaml/api.yaml#L185) 中定义的输入参数顺序传入,C++ 算子的输入、输出和属性等描述是通过 YAML 配置文件定义的,具体可参见 [开发 C++ 算子](new_cpp_op_cn.html) 章节介绍。
Expand Down