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

[bug] Fix dynamic SNode activation #1526

Merged
merged 2 commits into from
Jul 18, 2020

Conversation

yuanming-hu
Copy link
Member

@yuanming-hu yuanming-hu commented Jul 18, 2020

Related issue = close #1506

[Click here for the format server]

The old implementation first tests the length of the dynamic node and if the activation index is smaller than the activation node length, it returns without populating the linked list.

However, when it returns, it may be the case that a different thread has updated the linked list length but not yet populated the list.

Therefore the following write will fail because the element is not yet allocated.

The solution is to ensure that when the function returns the list is populated.


Copy link
Contributor

@xumingkuan xumingkuan left a comment

Choose a reason for hiding this comment

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

I see. Thanks for fixing this!

@codecov
Copy link

codecov bot commented Jul 18, 2020

Codecov Report

Merging #1526 into master will decrease coverage by 1.45%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1526      +/-   ##
==========================================
- Coverage   67.63%   66.17%   -1.46%     
==========================================
  Files          38       38              
  Lines        5567     5405     -162     
  Branches      973      976       +3     
==========================================
- Hits         3765     3577     -188     
- Misses       1635     1660      +25     
- Partials      167      168       +1     
Impacted Files Coverage Δ
python/taichi/misc/task.py 75.00% <0.00%> (-5.00%) ⬇️
python/taichi/misc/gui.py 23.70% <0.00%> (-3.61%) ⬇️
python/taichi/lang/ast_checker.py 70.58% <0.00%> (-1.64%) ⬇️
python/taichi/lang/ops.py 91.94% <0.00%> (-1.40%) ⬇️
python/taichi/main.py 41.38% <0.00%> (-0.98%) ⬇️
python/taichi/lang/expr.py 88.05% <0.00%> (-0.91%) ⬇️
python/taichi/lang/matrix.py 90.74% <0.00%> (-0.76%) ⬇️
python/taichi/lang/linalg.py 89.33% <0.00%> (-0.67%) ⬇️
python/taichi/lang/meta.py 64.17% <0.00%> (-0.53%) ⬇️
python/taichi/lang/transformer.py 93.01% <0.00%> (-0.49%) ⬇️
... and 6 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 1dce5cd...73f5995. Read the comment docs.

@yuanming-hu yuanming-hu merged commit 71d433b into taichi-dev:master Jul 18, 2020
@archibate
Copy link
Collaborator

I noticed that Travis CI failed due to test_dynamic.py::test_append_ret_value:
https://travis-ci.com/github/taichi-dev/taichi/jobs/362315349#L5662
Does this PR fix that too?

@yuanming-hu yuanming-hu mentioned this pull request Jul 18, 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.

[test] test_dynamic.py fails randomly on Windows
3 participants