-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Conversation
There was a problem hiding this 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.
Hello? Could you provide more infomation about dynamic snode? |
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refuse, typo memoy
-> memory
.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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."
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>
Please do not trigger @taichi-gardener again, I will open a separate PR to run |
There was a problem hiding this 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.
Related issue = #736 #896 #902
[Click here for the format server]