-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[Backend] C language source to source backend #1332
Comments
I think it's a great idea! If you are interested in doing this, please feel free to ahead and do it. We don't need to support sparse data structures for the C backend, at least in the beginning. Once we have a C backend, we can use Emscripten to compile C to Javascript, resulting in a Javascript backend. |
Great idea! We can finally use Taichi as interpreter now😂 BTW, will the generated code run on GPU or CPU only? And will SIMD be re-supported? |
No, for now, after a private talk with @yuanming-hu , having these complex features like multithreading and SIMD in C backend is technically possible, but may cause compat issues. e.g. if people want to use Emscripten to translate generated C into JS. |
Yeah, SIMD will be recovered in the future, for LLVM backends (x64, ARM64) - not sure when we will have the energy to do that. |
I've been reading the legacy code recently, and it appears to me that the part for SIMD is the |
We don't plan to do Given people who want performance are usually using GPUs nowadays, I think this is not very urgent (but still very helpful for CPU users). |
Indeed...Still have to write some tough code for our cluster users 😂 |
Forgive me if I'm misunderstanding something, but why is this advantageous vs LLVM? Shouldn't LLVM be able to build 32-bit binaries? And compile to emscripten, etc? |
|
Concisely describe the proposed feature
Currently we have LLVM serve as a CPU backend, but LLVM is highly complicated and needs to be installed carefully, so that compiled Taichi program cannot run on a environment without a good environment support. e.g.
So, I would like to add a C language source to source backend, i.e. translate Taichi IR into C plain source code, which is aimed to be:
Describe the solution you'd like (if any)
Follow up the source to source attempt/infrastructure in OpenGL and Metal.
For the
ti.export
, since currently Taichi is made in a JIT manner, some refactor may be done to make it only compile but not execute.Additional comments
Feel free to close me without a reason if you feel this useless.
The text was updated successfully, but these errors were encountered: