Skip to content

Conversation

megemini
Copy link
Contributor

PR types

Others

PR changes

Docs

Description

【Hackathon 6th No.2】为 Paddle 新增 cholesky_inverse API

相关接口的 RFC,请评审 ~

Copy link

paddle-bot bot commented May 10, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请检查PR提交格式和内容是否完备,具体请参考示例模版
Your PR has been submitted. Thanks for your contribution!
Please check its format and content. For this, you can refer to Template and Demo.

- **参数组合场景**
- 需要测试单个向量的输入方式
- 需要测试 Tensor.cholesky_inverse 的输入方式
- 需要测试不同数据类型:float32, float64

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fp16 跟bfp16如果支持的话也请测试一下

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inverse 不支持 fp16 bfp16

inverse_kernel.cu

PD_REGISTER_KERNEL(
    inverse, GPU, ALL_LAYOUT, phi::InverseKernel, float, double) {}

这咋办?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inverse能不能注册下fp16和bfp16?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

试了下,不行 ... ...

/home/shun/Documents/Projects/paddle/megemini/Paddle/paddle/phi/kernels/funcs/blas/blas_impl.cu.h(2049): error: class "phi::funcs::CUBlas<phi::dtype::float16>" has no member "MATINV_BATCH"

blas_impl.cu.h 里面对于矩阵的逆运算不支持 float16 和 bfloat16 ~

也可参考 torch 的讨论:
pytorch/pytorch#40427

fp16 doesn't provide adequate accuracy for linear algebra functions, and thus libraries (magma and cusolver) don't implement linear algebra functions for fp16 datatype

float16 和 bfloat16 的精度不足以支撑此运算 ~

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

了解了 如果原生算子支持的话组合相关的也需要支持,原生不支持的话就不再本次任务范围内了哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants