-
Notifications
You must be signed in to change notification settings - Fork 408
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
MDRangePolicy has no API to obtain the default tile size #6609
Comments
Note that |
Interesting, thanks for the hint. I'll use |
In case anyone's wondering, I've solved my original question that motivated the creation of this issue: understanding the default behaviors of Kokkos. Right now under most situations, MDRangePolicy's default tiling has a size of 2, with the exception of the last dimension (or stride-1 dimension), which is used in full. Thus, a 100x100x100 index space would usually be tiled by default as 2x2x100. This is consistent with the common programmer experience that 2D loop tiling in 3D space is faster than 3D loop tiling in 3D space since the last loop dimension consists of stride-1 streaming accesses. This practice is sometimes known as "2.5D tiling" in research papers. Storing the array in a tiled format can reduce the 3D tiling overhead if its use is preferred. Right now Kokkos offers |
@biergaizi - have we been able to answer your questions, and provide the help you need? |
It solved my personal problem but I don't think it has solved this Kokkos problem. There's still no public API to obtain the default tile size, so this is at best a workaround and there's still no "legal" way to do it. |
Yeah, we actually probably need a max tile size as well. Possibly this needs to follow the TeamPolicy pattern of recommended and max team_size. I am putting this on our to-do list. |
I have parallelized a loop with Kokkos that iterates across 3D space using an
MDRangePolicy
with rank 3, and I want to investigate the performance impact of different tile sizes. Unfortunately, according to the documentation,MDRangePolicy
has no public API to query the default tile sizes, so the default decision by Kokkos is a mystery to users. I've tried to manually specify various tile sizes, none of the sizes I've guessed is as fast as the unknown one used picked by Kokkos, so knowing the values is of great practical significance.MDRangePolicy should provide a public API to expose this runtime setting, similar to
chunk_size()
orteam_size_recommended()
inTeamPolicy
.The text was updated successfully, but these errors were encountered: