New Einsum API (#33821)
* OP dot: refactor CPU kernels and get better loop performance.
* Minor fix on code format.
* Fixed minor errors.
* Add new API: einsum
* Update the Einsum unit test.
One case failed with matmul_v2, where the dtype is int64:
a = np.arange(2 * 3 * 1).reshape(2, 3, 1)
b = np.arange(1)
paddle.einsum("...i, ...i", a, b)
* Test cases in test_einsum test floating point dtypes only.
As of now Paddle only supports float/double dtypes in matmul, which is
one of building blocks of this Einsum implementation. We decide not to
test einsum against other dtypes.
* Polish format.
* More formatting.
* Format...
* Einsum: improve test coverage.
* Einsum: bug fixes and more testcases for testing error messages
* Einsum: fix format..
* Einsum: fixed typo and format.
* Einsum: format again...
* Einsum: applied suggested changes.
* Einsum API: improve API documentation.
* Einsum API: apply suggested changes.
* Einsum API: Add dygraph only note.
* Einsum API: Add dygraph only note.
* Einsum API: fixed unittest.
Showing
python/paddle/tensor/einsum.py
0 → 100644
此差异已折叠。
想要评论请 注册 或 登录