-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[PHI] Code auto-generate for Sparse API #40060
Conversation
Thanks for your contribution! |
Add unittest test_sparse_conv_api
std::make_shared<phi::SparseCsrTensor>(phi::DenseTensor(), | ||
phi::DenseTensor(), | ||
phi::DenseTensor(), | ||
phi::DDim{-1}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是不是没有测试过,SparseCsrTensor 的构造函数内会检查 dims 的长度,只允许 2d 和 3d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR types
New features
PR changes
APIs
Describe
Sparse API支持通过yaml配置完成接口代码的自动生成。
以sparse_conv3d为例,其yaml配置格式如下:
配置规则与普通API基本相同,区别在于:
"@XXX"
的后缀标记返回Tensor的具体数据类型