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

[Example] Enhance stable_fluid.py with BFECC, RK2, RK3 and Taichi's new syntax #1617

Merged
merged 5 commits into from
Aug 3, 2020

Conversation

archibate
Copy link
Collaborator

Related issue = #

[Click here for the format server]


Btw, who wrote this cool example?



@ti.kernel
def pressure_jacobi(pf: ti.template(), new_pf: ti.template()):
ti.cache_read_only(pf)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, can we document this feature somewhere? I'm puzzled, despite it brings a bit of FPS improvements, and I guess I'm using it correct...

taichi_lang_core.cache(1, v.ptr)
def cache_read_only(*args):
for v in args:
taichi_lang_core.cache(1, v.loop_range().ptr)


def assume_in_range(val, base, low, high):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this function used for? Can we have a section performance.rst in Advanced programming explaining these cool APIs? Or they're just incomplete or even buggy for now?

@codecov
Copy link

codecov bot commented Jul 31, 2020

Codecov Report

Merging #1617 into master will decrease coverage by 1.80%.
The diff coverage is 20.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1617      +/-   ##
==========================================
- Coverage   46.01%   44.20%   -1.81%     
==========================================
  Files          40       41       +1     
  Lines        5544     5843     +299     
  Branches     1002     1011       +9     
==========================================
+ Hits         2551     2583      +32     
- Misses       2840     3106     +266     
- Partials      153      154       +1     
Impacted Files Coverage Δ
python/taichi/lang/__init__.py 55.06% <20.00%> (+0.30%) ⬆️
python/taichi/lang/ops.py 43.11% <0.00%> (-8.88%) ⬇️
python/taichi/lang/expr.py 63.79% <0.00%> (-5.16%) ⬇️
python/taichi/lang/matrix.py 67.31% <0.00%> (-4.51%) ⬇️
python/taichi/lang/snode.py 67.56% <0.00%> (-2.91%) ⬇️
python/taichi/lang/impl.py 66.08% <0.00%> (-2.18%) ⬇️
python/taichi/lang/transformer.py 80.92% <0.00%> (-0.69%) ⬇️
python/taichi/lang/kernel.py 68.71% <0.00%> (-0.66%) ⬇️
python/taichi/main.py 24.12% <0.00%> (-0.41%) ⬇️
python/taichi/lang/util.py 28.93% <0.00%> (-0.37%) ⬇️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0019090...42b02fb. Read the comment docs.

examples/stable_fluid.py Outdated Show resolved Hide resolved
@archibate archibate added the LGTM label Aug 2, 2020
@archibate archibate merged commit 93a985f into taichi-dev:master Aug 3, 2020
@yuanming-hu yuanming-hu mentioned this pull request Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants