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

[doc] Document list generation #990

Merged
merged 2 commits into from
May 15, 2020
Merged

Conversation

yuanming-hu
Copy link
Member

@yuanming-hu yuanming-hu commented May 15, 2020

Copy link
Collaborator

@archibate archibate left a comment

Choose a reason for hiding this comment

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

Thank for adding this, this is really helpful for backend maintainers, lgtm in general except for a few questions.

Comment on lines 58 to 59
- (Tasks ``$0`` and ``$1``) from the list of ``root`` node (``S0``) to list of the ``dense`` nodes (``S1``);
- (Tasks ``$2`` and ``$3``) from the list of ``dense`` nodes (``S1``) to the list of ``bitmasked`` nodes (``S2``).
Copy link
Collaborator

Choose a reason for hiding this comment

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

What does from ... to mean? Can we clarify this?

@ti.kernel
def func():
for i in x:
print(i)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess this will always get not printed since bitmasked is inactivated by default.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's true. We are just illustrating list generation here.

Comment on lines 17 to 19
Our strategy is to generate lists of SNode elements layer by layer.
This flattens the data structure leaf elements into a 1D dense array, circumventing the irregularity of
incomplete trees. Then we can simply invoke a regular **parallel for** over the list.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Our strategy is to generate lists of SNode elements layer by layer.
This flattens the data structure leaf elements into a 1D dense array, circumventing the irregularity of
incomplete trees. Then we can simply invoke a regular **parallel for** over the list.
Our strategy is to generate a list of SNode element indices for each layer.
This flattens the data structure leaf elements into a 1D dense array, circumventing the irregularity of
incomplete trees. Then we can simply invoke a regular **parallel for** over the list.

Also, is the generated list stored in CPU or GPU memory? If you find the process hard to explain, please use LLVM implementation for example.

Copy link
Member

Choose a reason for hiding this comment

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

It's on GPU, and these lists are updated in a kernel. There are multiple lists so I think plural form is the correct one. I'd suggest to say lists of active SNode elements layer by layer.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Our strategy is to generate lists of SNode elements layer by layer.
This flattens the data structure leaf elements into a 1D dense array, circumventing the irregularity of
incomplete trees. Then we can simply invoke a regular **parallel for** over the list.
Our strategy is to generate several lists of active SNode elements on GPU, layer by layer.
This flattens the data structure leaf elements into a 1D dense array, circumventing the irregularity of
incomplete trees. Then we can simply invoke a regular **parallel for** over the list.

Copy link
Member Author

@yuanming-hu yuanming-hu May 15, 2020

Choose a reason for hiding this comment

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

I'll be more specific and say generation will happen on the device.

Comment on lines 17 to 19
Our strategy is to generate lists of SNode elements layer by layer.
This flattens the data structure leaf elements into a 1D dense array, circumventing the irregularity of
incomplete trees. Then we can simply invoke a regular **parallel for** over the list.
Copy link
Member

Choose a reason for hiding this comment

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

It's on GPU, and these lists are updated in a kernel. There are multiple lists so I think plural form is the correct one. I'd suggest to say lists of active SNode elements layer by layer.

@yuanming-hu
Copy link
Member Author

Thanks for the reviews! I'm merging this, so that I can add more details on the internal designs (for #986) following this PR.

@yuanming-hu yuanming-hu merged commit 7716b47 into taichi-dev:master May 15, 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.

3 participants