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] Add documentions for layout #900

Merged
merged 28 commits into from
May 11, 2020
Merged

Conversation

archibate
Copy link
Collaborator

@archibate archibate commented Apr 29, 2020

@archibate archibate requested review from yuanming-hu and k-ye April 29, 2020 04:44
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
@archibate archibate requested a review from k-ye April 29, 2020 09:24
@archibate archibate linked an issue Apr 29, 2020 that may be closed by this pull request
docs/layout.rst Outdated Show resolved Hide resolved
Copy link
Member

@yuanming-hu yuanming-hu left a comment

Choose a reason for hiding this comment

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

Thanks! It's well written in general except for a few typos. Please fix these first and then I'll take a final pass.

docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/snode.rst Outdated Show resolved Hide resolved
@archibate
Copy link
Collaborator Author

Hello? Could you provide more infomation about dynamic snode?

docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
val = ti.var(ti.f32)
ti.root.dense(ti.ijk, (8, 16, 32)).dense(ti.ijk, (4, 4, 4)).place(val)

This organizes ``val`` in ``4x4x4`` blocks, so that with high probability ``val[i, j, k]`` and its neighbours are close to each other (i.e., in the same cacheline or memory page).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This organizes ``val`` in ``4x4x4`` blocks, so that with high probability ``val[i, j, k]`` and its neighbours are close to each other (i.e., in the same cacheline or memory page).
This organizes ``val`` in ``4x4x4`` blocks, so that with high probability ``val[i, j, k]`` and its neighbours are close to each other (i.e., in the same memoy page or even cacheline).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Refuse, typo memoy -> memory.

Copy link
Member

Choose a reason for hiding this comment

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

My point is that memory should come before cacheline

for i, j in A:
A[i, j] += 1

will iterate over elements of ``A`` following row-major order. If ``A`` is column-major, then the iteration follows the column-major order.
Copy link
Member

@k-ye k-ye May 10, 2020

Choose a reason for hiding this comment

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

Suggested change
will iterate over elements of ``A`` following row-major order. If ``A`` is column-major, then the iteration follows the column-major order.
the above code snippet will iterate over elements of ``A`` following the row-major order.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Refuse, this will make the col-major ignored. We want to emph that taichi can take care of the raw/col-major switch.

Copy link
Member

Choose a reason for hiding this comment

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

TBH you could simply say "Same for column-major order."

docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
docs/snode.rst Outdated Show resolved Hide resolved
docs/snode.rst Outdated Show resolved Hide resolved
docs/layout.rst Outdated Show resolved Hide resolved
archibate and others added 5 commits May 10, 2020 15:33
Co-authored-by: Ye Kuang <k-ye@users.noreply.github.com>
Co-authored-by: Ye Kuang <k-ye@users.noreply.github.com>
Co-authored-by: Ye Kuang <k-ye@users.noreply.github.com>
@archibate
Copy link
Collaborator Author

archibate commented May 11, 2020

Please do not trigger @taichi-gardener again, I will open a separate PR to run ti format for all the dirty files, after #839 and #943 get fixed.

@archibate archibate requested review from yuanming-hu and k-ye May 11, 2020 05:00
Copy link
Member

@yuanming-hu yuanming-hu left a comment

Choose a reason for hiding this comment

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

Looks good now! Thanks. Let's merge this as soon as possible since this PR has already been here for a while. As promised, this week I'll take a pass through the English documentation.

@archibate
Copy link
Collaborator Author

Great! I'm merging this now. We will solve #896 and #902 after you done with #941 in another PR that focus on sparse.

@archibate archibate merged commit 6f867f7 into taichi-dev:master May 11, 2020
@archibate archibate mentioned this pull request May 11, 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.

4 participants