- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings! I would like to answer a question how the partitioning in nd-range works.
I have a sycl::nd_range<2>(sycl::range<2>(6,3), sycl::range<2>(6,1)...) and expected to partition with 18/6=3 groups, however when i use item.get_group it shows that i have only one, zero number, group. Therefore how to make a 3 groups or, if its impossible with this approach, how to make a loop like in pseudocode:
Total =6
Groups=3
NinGroup=Total/Groups
For(i=0, i<5, i++)
For(ii in TotalNinGroup)
I have a sycl::nd_range<2>(sycl::range<2>(6,3), sycl::range<2>(6,1)...) and expected to partition with 18/6=3 groups, however when i use item.get_group it shows that i have only one, zero number, group. Therefore how to make a 3 groups or, if its impossible with this approach, how to make a loop like in pseudocode:
Total =6
Groups=3
NinGroup=Total/Groups
For(i=0, i<5, i++)
For(ii in TotalNinGroup)
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Solved a problem. I used to obtain group id as get_group(0), however should be get_group(1).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I’ve been working with and work-group sizes in DPC++ recently, and I agree this can be confusing at first. One tip that helped me was to start with simple, evenly divisible global and local sizes so you can clearly see how and behave. Once that’s working, you can adjust for performance. Also pay attention to how the work-group size affects memory access and barriers mismatched sizes or non-uniform divisions often lead to unexpected behavior. If you can share the specific kernel and the sizes you’re using, it might be easier to pinpoint where the issue is happening.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page