Skip to content

changed the default sub-group size from 8 to 32 #1406

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
merged 1 commit into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
" auto out = stream(1024, 768, h);\n",
"\n",
" //# nd-range kernel with user specified sub_group size\n",
" h.parallel_for(nd_range<1>(N, B), [=](nd_item<1> item)[[intel::reqd_sub_group_size(8)]] {\n",
" h.parallel_for(nd_range<1>(N, B), [=](nd_item<1> item)[[intel::reqd_sub_group_size(32)]] {\n",
" //# get sub_group handle\n",
" auto sg = item.get_sub_group();\n",
"\n",
Expand Down Expand Up @@ -783,7 +783,7 @@
" for(int i=0; i<N; i++) std::cout << input[i] << \" \"; std::cout << \"\\n\"; \n",
"\n",
" //# use parallel_for and sub_groups\n",
" q.parallel_for(nd_range<1>(N, B), [=](nd_item<1> item)[[intel::reqd_sub_group_size(8)]] {\n",
" q.parallel_for(nd_range<1>(N, B), [=](nd_item<1> item)[[intel::reqd_sub_group_size(32)]] {\n",
" auto sg = item.get_sub_group();\n",
" auto i = item.get_global_id(0);\n",
"\n",
Expand Down Expand Up @@ -976,7 +976,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.7 (Intel® oneAPI)",
"display_name": "Python 3 (Intel® oneAPI 2023.0)",
"language": "python",
"name": "c009-intel_distribution_of_python_3_oneapi-beta05-python"
},
Expand All @@ -990,7 +990,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.9.15"
},
"toc": {
"base_numbering": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ int main() {
auto out = stream(1024, 768, h);

//# nd-range kernel with user specified sub_group size
h.parallel_for(nd_range<1>(N, B), [=](nd_item<1> item)[[intel::reqd_sub_group_size(8)]] {
h.parallel_for(nd_range<1>(N, B), [=](nd_item<1> item)[[intel::reqd_sub_group_size(32)]] {
//# get sub_group handle
auto sg = item.get_sub_group();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int main() {
for(int i=0; i<N; i++) std::cout << input[i] << " "; std::cout << "\n";

//# use parallel_for and sub_groups
q.parallel_for(nd_range<1>(N, B), [=](nd_item<1> item)[[intel::reqd_sub_group_size(8)]] {
q.parallel_for(nd_range<1>(N, B), [=](nd_item<1> item)[[intel::reqd_sub_group_size(32)]] {
auto sg = item.get_sub_group();
auto i = item.get_global_id(0);

Expand Down