-
Notifications
You must be signed in to change notification settings - Fork 98
[SYCLomatic] Add query-api-mapping for 43 cooperative_groups APIs #2901
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
Merged
zhimingwang36
merged 10 commits into
oneapi-src:SYCLomatic
from
ShengchenJ:up_cop_query2
Jun 20, 2025
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b39e119
Init cooperative_group query API.
ShengchenJ c60e99c
up
ShengchenJ aef9bd9
update
ShengchenJ 7a9e2fe
Update
ShengchenJ cbcafad
up
ShengchenJ fe8d9ed
update
ShengchenJ d506f4b
update
ShengchenJ 95e7c49
Merge remote-tracking branch 'upstream/up_cop_query2' into up_cop_query2
ShengchenJ 4422e61
up
ShengchenJ 12fcedc
update
ShengchenJ File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
clang/examples/DPCT/Runtime/cooperative_groups$$bit_and.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #include "cooperative_groups.h" | ||
| #include <cooperative_groups/reduce.h> | ||
|
|
||
| __global__ void test() { | ||
| int *sdata; | ||
| cooperative_groups::thread_block cta = | ||
| cooperative_groups::this_thread_block(); | ||
| const unsigned int tid = cta.thread_rank(); | ||
| cooperative_groups::thread_block_tile<32> tile32 = cooperative_groups::tiled_partition<32>(cta); | ||
| int *idata; | ||
| // Start | ||
| cooperative_groups::reduce(tile32 /*thread_block_tile<32>*/, sdata[tid]/*data*/, cooperative_groups::bit_and<int>()/*cg::bit_and<T>*/); | ||
| // End | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #include "cooperative_groups.h" | ||
| #include <cooperative_groups/reduce.h> | ||
|
|
||
| __global__ void test() { | ||
| int *sdata; | ||
| cooperative_groups::thread_block cta = | ||
| cooperative_groups::this_thread_block(); | ||
| const unsigned int tid = cta.thread_rank(); | ||
| cooperative_groups::thread_block_tile<32> tile32 = cooperative_groups::tiled_partition<32>(cta); | ||
| int *idata; | ||
| // Start | ||
| cooperative_groups::reduce(tile32 /*thread_block_tile<32>*/, sdata[tid]/*data*/, cooperative_groups::bit_or<int>()/*cg::bit_or<T>*/); | ||
| // End | ||
| } |
14 changes: 14 additions & 0 deletions
14
clang/examples/DPCT/Runtime/cooperative_groups$$bit_xor.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #include "cooperative_groups.h" | ||
| #include <cooperative_groups/reduce.h> | ||
|
|
||
| __global__ void test() { | ||
| int *sdata; | ||
| cooperative_groups::thread_block cta = | ||
| cooperative_groups::this_thread_block(); | ||
| const unsigned int tid = cta.thread_rank(); | ||
| cooperative_groups::thread_block_tile<32> tile32 = cooperative_groups::tiled_partition<32>(cta); | ||
| int *idata; | ||
| // Start | ||
| cooperative_groups::reduce(tile32 /*thread_block_tile<32>*/, sdata[tid]/*data*/, cooperative_groups::bit_xor<int>()/*cg::bit_xor<T>*/); | ||
| // End | ||
| } |
10 changes: 10 additions & 0 deletions
10
clang/examples/DPCT/Runtime/cooperative_groups$$coalesced_group$$shfl.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // Option: --use-experimental-features=non-uniform-groups | ||
| #include <cooperative_groups.h> | ||
|
|
||
| __global__ void test() { | ||
|
|
||
| // Start | ||
| cooperative_groups::coalesced_group active = cooperative_groups::coalesced_threads(); | ||
| active.shfl(0, 0); | ||
| // End | ||
| } |
10 changes: 10 additions & 0 deletions
10
clang/examples/DPCT/Runtime/cooperative_groups$$coalesced_group$$size.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // Option: --use-experimental-features=non-uniform-groups | ||
| #include <cooperative_groups.h> | ||
|
|
||
| __global__ void test() { | ||
|
|
||
| // Start | ||
| cooperative_groups::coalesced_group active = cooperative_groups::coalesced_threads(); | ||
| active.size(); | ||
| // End | ||
| } |
9 changes: 9 additions & 0 deletions
9
clang/examples/DPCT/Runtime/cooperative_groups$$coalesced_group$$sync.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| // Option: --use-experimental-features=non-uniform-groups | ||
| #include <cooperative_groups.h> | ||
|
|
||
| __global__ void test() { | ||
| // Start | ||
| cooperative_groups::coalesced_group active = cooperative_groups::coalesced_threads(); | ||
| active.sync(); | ||
| // End | ||
| } |
11 changes: 11 additions & 0 deletions
11
clang/examples/DPCT/Runtime/cooperative_groups$$coalesced_group$$thread_rank.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // Option: --use-experimental-features=non-uniform-groups | ||
| #include <cooperative_groups.h> | ||
|
|
||
|
|
||
| __global__ void test() { | ||
| // Start | ||
| cooperative_groups::coalesced_group active = | ||
| cooperative_groups::coalesced_threads(); | ||
| active.thread_rank(); | ||
| // End | ||
| } |
9 changes: 9 additions & 0 deletions
9
clang/examples/DPCT/Runtime/cooperative_groups$$coalesced_threads.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| // Option: --use-experimental-features=non-uniform-groups | ||
| #include <cooperative_groups.h> | ||
| #include <cooperative_groups/reduce.h> | ||
|
|
||
| __global__ void test() { | ||
| // Start | ||
| cooperative_groups::coalesced_group active = cooperative_groups::coalesced_threads(); | ||
| // End | ||
| } |
18 changes: 18 additions & 0 deletions
18
clang/examples/DPCT/Runtime/cooperative_groups$$exclusive_scan.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #include <cooperative_groups.h> | ||
| #include <cooperative_groups/scan.h> | ||
|
|
||
| __global__ void test() { | ||
| double *sdata; | ||
| cooperative_groups::thread_block cta = | ||
| cooperative_groups::this_thread_block(); | ||
| const unsigned int tid = cta.thread_rank(); | ||
| cooperative_groups::thread_block_tile<32> tile32 = | ||
| cooperative_groups::tiled_partition<32>(cta); | ||
| // Start | ||
| cooperative_groups::exclusive_scan( | ||
| tile32 /* type group */, sdata[tid] /* type value */, | ||
| cooperative_groups::plus<double>() /* type operator */); | ||
| cooperative_groups::exclusive_scan(tile32 /* type group */, | ||
| sdata[tid] /* type value */); | ||
| // End | ||
| } |
14 changes: 14 additions & 0 deletions
14
clang/examples/DPCT/Runtime/cooperative_groups$$greater.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #include "cooperative_groups.h" | ||
| #include <cooperative_groups/reduce.h> | ||
|
|
||
| __global__ void test() { | ||
| double *sdata; | ||
| cooperative_groups::thread_block cta = | ||
| cooperative_groups::this_thread_block(); | ||
| const unsigned int tid = cta.thread_rank(); | ||
| cooperative_groups::thread_block_tile<32> tile32 = cooperative_groups::tiled_partition<32>(cta); | ||
| int *idata; | ||
| // Start | ||
| cooperative_groups::reduce(tile32 /*thread_block_tile<32>*/, sdata[tid]/*data*/, cooperative_groups::greater<double>()/*cg::greater<T>*/); | ||
| // End | ||
| } |
11 changes: 11 additions & 0 deletions
11
clang/examples/DPCT/Runtime/cooperative_groups$$grid_group$$block_rank.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // Option: --use-experimental-features=nd_range_barrier,root-group | ||
| #include <cooperative_groups.h> | ||
| #include <cooperative_groups/scan.h> | ||
|
|
||
| __global__ void test() { | ||
|
|
||
| // Start | ||
| cooperative_groups::grid_group grid = cooperative_groups::this_grid(); | ||
| grid.block_rank(); | ||
| // End | ||
| } |
11 changes: 11 additions & 0 deletions
11
clang/examples/DPCT/Runtime/cooperative_groups$$grid_group$$num_blocks.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // Option: --use-experimental-features=nd_range_barrier,root-group | ||
| #include <cooperative_groups.h> | ||
| #include <cooperative_groups/scan.h> | ||
|
|
||
| __global__ void test() { | ||
|
|
||
| // Start | ||
| cooperative_groups::grid_group grid = cooperative_groups::this_grid(); | ||
| grid.num_blocks(); | ||
| // End | ||
| } |
11 changes: 11 additions & 0 deletions
11
clang/examples/DPCT/Runtime/cooperative_groups$$grid_group$$num_threads.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // Option: --use-experimental-features=nd_range_barrier,root-group | ||
| #include <cooperative_groups.h> | ||
| #include <cooperative_groups/scan.h> | ||
|
|
||
| __global__ void test() { | ||
|
|
||
| // Start | ||
| cooperative_groups::grid_group grid = cooperative_groups::this_grid(); | ||
| grid.num_threads(); | ||
| // End | ||
| } | ||
11 changes: 11 additions & 0 deletions
11
clang/examples/DPCT/Runtime/cooperative_groups$$grid_group$$size.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // Option: --use-experimental-features=nd_range_barrier,root-group | ||
| #include <cooperative_groups.h> | ||
| #include <cooperative_groups/scan.h> | ||
|
|
||
| __global__ void test() { | ||
|
|
||
| // Start | ||
| cooperative_groups::grid_group grid = cooperative_groups::this_grid(); | ||
| grid.size(); | ||
| // End | ||
| } |
11 changes: 11 additions & 0 deletions
11
clang/examples/DPCT/Runtime/cooperative_groups$$grid_group$$sync.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // Option: --use-experimental-features=nd_range_barrier,root-group | ||
| #include <cooperative_groups.h> | ||
| #include <cooperative_groups/scan.h> | ||
|
|
||
| __global__ void test() { | ||
|
|
||
| // Start | ||
| cooperative_groups::grid_group grid = cooperative_groups::this_grid(); | ||
| grid.sync(); | ||
| // End | ||
| } |
9 changes: 9 additions & 0 deletions
9
clang/examples/DPCT/Runtime/cooperative_groups$$grid_group$$thread_rank.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #include <cooperative_groups.h> | ||
|
|
||
| __global__ void test() { | ||
|
|
||
| // Start | ||
| cooperative_groups::grid_group grid = cooperative_groups::this_grid(); | ||
| grid.thread_rank() /* grid_group::thread_rank */; | ||
| // End | ||
| } |
21 changes: 21 additions & 0 deletions
21
clang/examples/DPCT/Runtime/cooperative_groups$$inclusive_scan.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #include <cooperative_groups.h> | ||
| #include <cooperative_groups/scan.h> | ||
|
|
||
| __global__ void test() { | ||
| double *sdata; | ||
| cooperative_groups::thread_block cta = | ||
| cooperative_groups::this_thread_block(); | ||
| const unsigned int tid = cta.thread_rank(); | ||
| cooperative_groups::thread_block_tile<32> tile32 = | ||
| cooperative_groups::tiled_partition<32>(cta); | ||
|
|
||
| // Start | ||
| cooperative_groups::inclusive_scan( | ||
| tile32 /* type group */, sdata[tid] /* type value */, | ||
| cooperative_groups::plus<double>() /* type operator */); | ||
|
|
||
| cooperative_groups::inclusive_scan(tile32 /* type group */, | ||
| sdata[tid] /* type value */); | ||
|
|
||
| // End | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #include "cooperative_groups.h" | ||
| #include <cooperative_groups/reduce.h> | ||
|
|
||
| __global__ void test() { | ||
| double *sdata; | ||
| cooperative_groups::thread_block cta = | ||
| cooperative_groups::this_thread_block(); | ||
| const unsigned int tid = cta.thread_rank(); | ||
| cooperative_groups::thread_block_tile<32> tile32 = cooperative_groups::tiled_partition<32>(cta); | ||
| int *idata; | ||
| // Start | ||
| cooperative_groups::reduce(tile32 /*thread_block_tile<32>*/, sdata[tid]/*data*/, cooperative_groups::less<double>()/*cg::less<T>*/); | ||
| // End | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #include "cooperative_groups.h" | ||
| #include <cooperative_groups/reduce.h> | ||
|
|
||
| __global__ void test() { | ||
| double *sdata; | ||
| cooperative_groups::thread_block cta = | ||
| cooperative_groups::this_thread_block(); | ||
| const unsigned int tid = cta.thread_rank(); | ||
| cooperative_groups::thread_block_tile<32> tile32 = cooperative_groups::tiled_partition<32>(cta); | ||
| int *idata; | ||
| // Start | ||
| cooperative_groups::reduce(tile32 /*thread_block_tile<32>*/, sdata[tid]/*data*/, cooperative_groups::plus<double>()/*cg::plus<T>*/); | ||
| // End | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| // Option: --use-experimental-features=logical-group | ||
| #include "cooperative_groups.h" | ||
| #include <cooperative_groups/reduce.h> | ||
|
|
||
| __global__ void test() { | ||
|
|
||
| // Start | ||
| cooperative_groups::thread_block tb = cooperative_groups::this_thread_block(); | ||
| cooperative_groups::thread_block_tile<32> tbt32 = | ||
| cooperative_groups::tiled_partition<32>(tb); | ||
| tb.sync(); | ||
| tbt32.sync(); | ||
| cooperative_groups::sync(tb); | ||
| cooperative_groups::sync(tbt32); | ||
| // End | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| // Option: --use-experimental-features=root-group | ||
| #include "cooperative_groups.h" | ||
| #include <cooperative_groups/reduce.h> | ||
|
|
||
| __global__ void test() { | ||
| // Start | ||
| cooperative_groups::grid_group grid = cooperative_groups::this_grid(); | ||
| // End | ||
| } |
9 changes: 9 additions & 0 deletions
9
clang/examples/DPCT/Runtime/cooperative_groups$$this_thread.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| // Option: --use-experimental-features=logical-group | ||
| #include "cooperative_groups.h" | ||
| #include <cooperative_groups/reduce.h> | ||
|
|
||
| __global__ void test() { | ||
| // Start | ||
| auto thread = cooperative_groups::this_thread(); | ||
| // End | ||
| } |
10 changes: 10 additions & 0 deletions
10
clang/examples/DPCT/Runtime/cooperative_groups$$thread_block$$group_index.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #include <cooperative_groups.h> | ||
| #include <cooperative_groups/scan.h> | ||
|
|
||
| __global__ void test() { | ||
|
|
||
| // Start | ||
| cooperative_groups::thread_block tb = cooperative_groups::this_thread_block(); | ||
| tb.thread_index(); | ||
| // End | ||
| } |
11 changes: 11 additions & 0 deletions
11
clang/examples/DPCT/Runtime/cooperative_groups$$thread_block$$num_threads.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #include <cooperative_groups.h> | ||
| #include <cooperative_groups/scan.h> | ||
|
|
||
| __global__ void test() { | ||
|
|
||
| // Start | ||
| cooperative_groups::thread_block tb = cooperative_groups::this_thread_block(); | ||
|
|
||
| tb.num_threads(); | ||
| // End | ||
| } |
9 changes: 9 additions & 0 deletions
9
clang/examples/DPCT/Runtime/cooperative_groups$$thread_block$$size.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #include <cooperative_groups.h> | ||
| #include <cooperative_groups/scan.h> | ||
|
|
||
| __global__ void test() { | ||
| // Start | ||
| cooperative_groups::thread_block tb = cooperative_groups::this_thread_block(); | ||
| tb.size(); | ||
| // End | ||
| } |
10 changes: 10 additions & 0 deletions
10
clang/examples/DPCT/Runtime/cooperative_groups$$thread_block$$sync.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #include <cooperative_groups.h> | ||
| #include <cooperative_groups/scan.h> | ||
|
|
||
| __global__ void test() { | ||
|
|
||
| // Start | ||
| cooperative_groups::thread_block tb = cooperative_groups::this_thread_block(); | ||
| tb.sync(); | ||
| // End | ||
| } |
11 changes: 11 additions & 0 deletions
11
clang/examples/DPCT/Runtime/cooperative_groups$$thread_block$$thread_index.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #include <cooperative_groups.h> | ||
| #include <cooperative_groups/scan.h> | ||
|
|
||
| __global__ void test() { | ||
|
|
||
| // Start | ||
| cooperative_groups::thread_block tb = | ||
| cooperative_groups::this_thread_block(); | ||
| tb.sync(); | ||
| // End | ||
| } |
10 changes: 10 additions & 0 deletions
10
clang/examples/DPCT/Runtime/cooperative_groups$$thread_block$$thread_rank.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #include <cooperative_groups.h> | ||
| #include <cooperative_groups/scan.h> | ||
|
|
||
| __global__ void test() { | ||
|
|
||
| // Start | ||
| cooperative_groups::thread_block tb = cooperative_groups::this_thread_block(); | ||
| tb.thread_rank(); | ||
| // End | ||
| } |
12 changes: 12 additions & 0 deletions
12
clang/examples/DPCT/Runtime/cooperative_groups$$thread_block_tile$$meta_group_rank.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #include <cooperative_groups.h> | ||
| #include <cooperative_groups/scan.h> | ||
|
|
||
| __global__ void test() { | ||
|
|
||
| cooperative_groups::thread_block block = cooperative_groups::this_thread_block(); | ||
| cooperative_groups::thread_block_tile<32> ctile32 = cooperative_groups::tiled_partition<32>(block); | ||
|
|
||
| // Start | ||
| ctile32.meta_group_rank();// thread_block_tile<tile size>::meta_group_rank | ||
| // End | ||
| } |
14 changes: 14 additions & 0 deletions
14
clang/examples/DPCT/Runtime/cooperative_groups$$thread_block_tile$$meta_group_size.cu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #include <cooperative_groups.h> | ||
| #include <cooperative_groups/scan.h> | ||
|
|
||
| __global__ void test() { | ||
|
|
||
| cooperative_groups::thread_block block = | ||
| cooperative_groups::this_thread_block(); | ||
|
|
||
| // Start | ||
| cooperative_groups::thread_block_tile<32> ctile32 = | ||
| cooperative_groups::tiled_partition<32>(block); | ||
| ctile32.meta_group_size(); | ||
| // End | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.