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

Certain pointer-based SNode tree behaves incorrect in packed mode #7112

Closed
g1n0st opened this issue Jan 10, 2023 · 0 comments · Fixed by #7121
Closed

Certain pointer-based SNode tree behaves incorrect in packed mode #7112

g1n0st opened this issue Jan 10, 2023 · 0 comments · Fixed by #7121
Assignees
Labels
bug We've confirmed that this is an BUG
Milestone

Comments

@g1n0st
Copy link
Contributor

g1n0st commented Jan 10, 2023

Describe the bug

When packed=True in global config and the SNode Tree is pointer(3, 3)-dense(8, 8), struct-for loop will omit certain index even it has been activated:

To Reproduce

import taichi as ti
ti.init(arch=ti.cpu, packed=True)
​
block_size, leaf_size = 3, 8x = ti.field(ti.i32)
block = ti.root.pointer(ti.ij, (block_size, block_size))
block.dense(ti.ij, (leaf_size, leaf_size)).place(x)
​
print(x.to_numpy().shape)
​
@ti.kernel
def activate():
  x[7, 7] = 1activate()
​
@ti.kernel
def test():
  for I in ti.grouped(x):
    if I[0] == 7 and I[1] == 7: print(I)
​
test()
​
# Expected Output:
# (24, 24)
# [7, 7]# Actual Output (iff block_size == 3 and x[7, 7] = 1):
# (24, 24)
@github-project-automation github-project-automation bot moved this to Untriaged in Taichi Lang Jan 10, 2023
@strongoier strongoier added this to the v1.4.0 milestone Jan 10, 2023
@strongoier strongoier added the bug We've confirmed that this is an BUG label Jan 11, 2023
@strongoier strongoier self-assigned this Jan 11, 2023
strongoier added a commit that referenced this issue Jan 11, 2023
Issue: fix #7112

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this from Untriaged to Done in Taichi Lang Jan 11, 2023
lin-hitonami pushed a commit to lin-hitonami/taichi that referenced this issue Jan 11, 2023
Issue: fix taichi-dev#7112

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
lin-hitonami pushed a commit to lin-hitonami/taichi that referenced this issue Jan 12, 2023
Issue: fix taichi-dev#7112

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
quadpixels pushed a commit to quadpixels/taichi that referenced this issue May 13, 2023
Issue: fix taichi-dev#7112

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We've confirmed that this is an BUG
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants