Taichi: [lang] More matrix functions

Created on 14 May 2020  路  3Comments  路  Source: taichi-dev/taichi

Concisely describe the proposed feature
I'm considering adding new functions to ti.Matrix, such as PCA, Cholesky decomposition, Strassen algorithm for __matmul__, etc.

Describe the solution you'd like (if any)
modifying linalg.py and matrix.py

Additional comments
I doubt that this is an important contribution since NumPy seems to do it pretty well already, and I personally don't see any realistic motivation for the functions proposed (since users don't necessarily need to do it in taichi). As for __matmul__, Strassen algorithm also may not be necessary because ti.Matrix is for small matrices (but may consider improving tensor-related operations in taichi).
Therefore, I'm opening up this question to the community where people with more experience in this can add their opinions.

feature request

Most helpful comment

@liaopeiyuan Thanks for proposing this! Sorry about my delayed reply.

I'm afraid these large dense matrix operations are not really what Taichi is designed for. As you mentioned, numpy already does that. However, if you would like to participate in Taichi's standard math library design, we do have an issue for it: https://github.com/taichi-dev/taichi/issues/833 Most of the design happens on small matrix (e.g. 3x3) operations.

Welcome to our community!

All 3 comments

Thank for purposing this. But don't worry about strassen matmul since taichi matrix are expected to be small, if one want to store big matrices, they should use taichi tensor instead.
Also note that taichi is mainly focused on computer graphics usage, if user want more matrix functions, a external package like numpy should be used, which is more mature on this topic.

@liaopeiyuan Thanks for proposing this! Sorry about my delayed reply.

I'm afraid these large dense matrix operations are not really what Taichi is designed for. As you mentioned, numpy already does that. However, if you would like to participate in Taichi's standard math library design, we do have an issue for it: https://github.com/taichi-dev/taichi/issues/833 Most of the design happens on small matrix (e.g. 3x3) operations.

Welcome to our community!

Thanks! I will definitely check it out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

g1n0st picture g1n0st  路  3Comments

jackalcooper picture jackalcooper  路  4Comments

yuanming-hu picture yuanming-hu  路  3Comments

archibate picture archibate  路  3Comments

quadpixels picture quadpixels  路  3Comments