Skip to content
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

UFL as frontend for taichi #2088

Open
salazardetroya opened this issue Dec 5, 2020 · 1 comment
Open

UFL as frontend for taichi #2088

salazardetroya opened this issue Dec 5, 2020 · 1 comment
Labels
feature request Suggest an idea on this project

Comments

@salazardetroya
Copy link

Concisely describe the proposed feature
I wanted to ask if there is interest on using the Unified Form Language (UFL) as frontend for taichi.

Describe the solution you'd like (if any)
The idea is to use UFL as a DSL that is very close to the mathematics with a form compiler such as TSFC to generate the local stiffness matrix and then use taichi to assemble them into the bigger matrix. The goal is to take advantage of the fast data structures in taichi and the versatility of the UFL language. This approach might be mixing apples and oranges since the UFL+TSFC toolchain is designed for the finite element method, whereas taichi is designed for cartesian meshes (if I am not wrong), but I can see some benefit.

@salazardetroya salazardetroya added the feature request Suggest an idea on this project label Dec 5, 2020
@k-ye
Copy link
Member

k-ye commented Dec 8, 2020

Thanks, this looks interesting! There has long been a plan to standardize the CHI IR infrastructure (#689), which had to be postponed due to the ongoing research projects. If you are super interested in Taichi, you can probably take a look at these files:

  1. https://github.com/taichi-dev/taichi/blob/master/python/taichi/lang/transformer.py: this walks the Python AST and translates it into CHI IR.
  2. https://github.com/taichi-dev/taichi/blob/master/taichi/ir/frontend_ir.h and https://github.com/taichi-dev/taichi/blob/master/taichi/ir/ir.h: these define the actual CHI IR structs
  3. https://github.com/taichi-dev/taichi/blob/master/taichi/python/export_lang.cpp: how the CHI IR in C++ is exposed to Python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Suggest an idea on this project
Projects
None yet
Development

No branches or pull requests

2 participants