einops
einops copied to clipboard
add mindspore support
Add mindspore deep learning framework support.
@arogozhnikov hello sir, I have committed a merge request for adding a new backend named MindSpore, which is a new DL framework. Would please review this pr and give some comments or merge it if no problems?
Hi @lvyufeng
thanks for a well-organized PR. Github CI does not have cuda, so effectively tests were turned off in your branch.
I've modified it to include tests (but skip einsum) and run on linux. Result is:
- ops are working
- but layers are failing with quite a strange error,
you can see error here in the log: https://github.com/arogozhnikov/einops/runs/7266742212?check_suite_focus=true
here is the branch that includes your code and my change to turn tests on: https://github.com/arogozhnikov/einops/tree/mindspore-show-issue
It looks like a bug on CPU platform, I will check it and try to fix it. BTW, I remember the mindspore-gpu
package i used was a development version, which is a daily compiled package, maybe the bug had beed fixed in MindSpore 1.8(which is released at July 26).
it seems that only Pynative
mode works well, you should add the following code snippet:
from mindspore import context
context.set_context(mode=context.PYNATIVE_MODE)
BTW, mindspore will set Pynative
mode as the default running mode since 1.9.0.
the error has been fixed.
@arogozhnikov the error has been fixed, would you please review the code and merge it?
This feature hasn't been merged yet?
Einops does not accept new backends, those require sufficient time for maintenance.
Lib authors can implement array api: https://data-apis.org/array-api/latest/API_specification/index.html and einops.array_api will immediately work for them.
Array api support will be available in einops 0.7
Relevant PR: #261