-
Notifications
You must be signed in to change notification settings - Fork 51
Feature/raja vec #83
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
base: develop
Are you sure you want to change the base?
Feature/raja vec #83
Changes from 5 commits
290fb27
ef92cd4
ab57da5
e38062a
3a18563
1d6bbea
c3192c4
7179925
cdccd30
793fc36
0cd73e6
e37904a
1a909d0
1ae4806
b53e74d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,26 +53,25 @@ void POLYBENCH_2MM::runOpenMPVariant(VariantID vid) | |
|
|
||
| POLYBENCH_2MM_VIEWS_RAJA; | ||
|
|
||
| auto poly_2mm_lam1 = [=](Index_type /*i*/, Index_type /*j*/, Index_type /*k*/, Real_type &dot) { | ||
| auto poly_2mm_lam1 = [=](Real_type &dot) { | ||
|
||
| POLYBENCH_2MM_BODY1_RAJA; | ||
| }; | ||
| auto poly_2mm_lam2 = [=](Index_type i, Index_type j, Index_type k, | ||
| Real_type &dot) { | ||
| POLYBENCH_2MM_BODY2_RAJA; | ||
| }; | ||
| auto poly_2mm_lam3 = [=](Index_type i, Index_type j, Index_type /*k*/, | ||
| auto poly_2mm_lam3 = [=](Index_type i, Index_type j, | ||
| Real_type &dot) { | ||
| POLYBENCH_2MM_BODY3_RAJA; | ||
| }; | ||
| auto poly_2mm_lam4 = [=](Index_type /*i*/, Index_type /*l*/, Index_type /*j*/, | ||
| Real_type &dot) { | ||
| auto poly_2mm_lam4 = [=](Real_type &dot) { | ||
| POLYBENCH_2MM_BODY4_RAJA; | ||
| }; | ||
| auto poly_2mm_lam5 = [=](Index_type i, Index_type l, Index_type j, | ||
| Real_type &dot) { | ||
| POLYBENCH_2MM_BODY5_RAJA; | ||
| }; | ||
| auto poly_2mm_lam6 = [=](Index_type i, Index_type l, Index_type /*j*/, | ||
| auto poly_2mm_lam6 = [=](Index_type i, Index_type l, | ||
| Real_type &dot) { | ||
| POLYBENCH_2MM_BODY6_RAJA; | ||
| }; | ||
|
|
@@ -168,23 +167,23 @@ void POLYBENCH_2MM::runOpenMPVariant(VariantID vid) | |
| RAJA::KernelPolicy< | ||
| RAJA::statement::Collapse<RAJA::omp_parallel_collapse_exec, | ||
| RAJA::ArgList<0, 1>, | ||
| RAJA::statement::Lambda<0>, | ||
| RAJA::statement::Lambda<0, RAJA::Params<0>>, | ||
| RAJA::statement::For<2, RAJA::loop_exec, | ||
| RAJA::statement::Lambda<1> | ||
| RAJA::statement::Lambda<1, RAJA::Segs<0,1,2>, RAJA::Params<0>> | ||
| >, | ||
| RAJA::statement::Lambda<2> | ||
| RAJA::statement::Lambda<2, RAJA::Segs<0,1>, RAJA::Params<0>> | ||
| > | ||
| >; | ||
| #else // without collapse... | ||
| using EXEC_POL = | ||
| RAJA::KernelPolicy< | ||
| RAJA::statement::For<0, RAJA::omp_parallel_for_exec, | ||
| RAJA::statement::For<1, RAJA::loop_exec, | ||
| RAJA::statement::Lambda<0>, | ||
| RAJA::statement::Lambda<0, RAJA::Params<0>>, | ||
| RAJA::statement::For<2, RAJA::loop_exec, | ||
| RAJA::statement::Lambda<1> | ||
| RAJA::statement::Lambda<1, RAJA::Segs<0,1,2>, RAJA::Params<0>> | ||
| >, | ||
| RAJA::statement::Lambda<2> | ||
| RAJA::statement::Lambda<2, RAJA::Segs<0,1>, RAJA::Params<0>> | ||
| > | ||
| > | ||
| >; | ||
|
|
@@ -194,21 +193,21 @@ void POLYBENCH_2MM::runOpenMPVariant(VariantID vid) | |
| for (RepIndex_type irep = 0; irep < run_reps; ++irep) { | ||
|
|
||
| RAJA::kernel_param<EXEC_POL>( | ||
| RAJA::make_tuple(RAJA::RangeSegment{0, ni}, | ||
| RAJA::RangeSegment{0, nj}, | ||
| RAJA::RangeSegment{0, nk}), | ||
| RAJA::make_tuple(static_cast<Real_type>(0.0)), | ||
| RAJA::make_tuple(RAJA::RangeSegment(0, ni), | ||
| RAJA::RangeSegment(0, nj), | ||
| RAJA::RangeSegment(0, nk)), | ||
| RAJA::tuple<Real_type> {0.0}, | ||
|
|
||
| poly_2mm_lam1, | ||
| poly_2mm_lam2, | ||
| poly_2mm_lam3 | ||
| ); | ||
|
|
||
| RAJA::kernel_param<EXEC_POL>( | ||
| RAJA::make_tuple(RAJA::RangeSegment{0, ni}, | ||
| RAJA::RangeSegment{0, nl}, | ||
| RAJA::RangeSegment{0, nj}), | ||
| RAJA::make_tuple(static_cast<Real_type>(0.0)), | ||
| RAJA::make_tuple(RAJA::RangeSegment(0, ni), | ||
| RAJA::RangeSegment(0, nl), | ||
| RAJA::RangeSegment(0, nj)), | ||
| RAJA::tuple<Real_type> {0.0}, | ||
|
|
||
| poly_2mm_lam4, | ||
| poly_2mm_lam5, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,27 +43,24 @@ void POLYBENCH_2MM::runSeqVariant(VariantID vid) | |
|
|
||
| POLYBENCH_2MM_VIEWS_RAJA; | ||
|
|
||
| auto poly_2mm_lam1 = [=](Index_type /*i*/, Index_type /*j*/, Index_type /*k*/, Real_type &dot) { | ||
| auto poly_2mm_lam1 = [=](Real_type &dot) { | ||
|
||
| POLYBENCH_2MM_BODY1_RAJA; | ||
| }; | ||
| auto poly_2mm_lam2 = [=](Index_type i, Index_type j, Index_type k, | ||
| Real_type &dot) { | ||
| POLYBENCH_2MM_BODY2_RAJA; | ||
| }; | ||
| auto poly_2mm_lam3 = [=](Index_type i, Index_type j, Index_type /*k*/, | ||
| Real_type &dot) { | ||
| auto poly_2mm_lam3 = [=](Index_type i, Index_type j, Real_type &dot) { | ||
| POLYBENCH_2MM_BODY3_RAJA; | ||
| }; | ||
| auto poly_2mm_lam4 = [=](Index_type /*i*/, Index_type /*l*/, Index_type /*j*/, | ||
| Real_type &dot) { | ||
| auto poly_2mm_lam4 = [=](Real_type &dot) { | ||
| POLYBENCH_2MM_BODY4_RAJA; | ||
| }; | ||
| auto poly_2mm_lam5 = [=](Index_type i, Index_type l, Index_type j, | ||
| Real_type &dot) { | ||
| POLYBENCH_2MM_BODY5_RAJA; | ||
| }; | ||
| auto poly_2mm_lam6 = [=](Index_type i, Index_type l, Index_type /*j*/, | ||
| Real_type &dot) { | ||
| auto poly_2mm_lam6 = [=](Index_type i, Index_type l, Real_type &dot) { | ||
| POLYBENCH_2MM_BODY6_RAJA; | ||
| }; | ||
|
|
||
|
|
@@ -137,36 +134,36 @@ void POLYBENCH_2MM::runSeqVariant(VariantID vid) | |
|
|
||
| using EXEC_POL = | ||
| RAJA::KernelPolicy< | ||
| RAJA::statement::For<0, RAJA::loop_exec, | ||
| RAJA::statement::For<1, RAJA::loop_exec, | ||
| RAJA::statement::Lambda<0>, | ||
| RAJA::statement::For<2, RAJA::loop_exec, | ||
| RAJA::statement::Lambda<1> | ||
| >, | ||
| RAJA::statement::Lambda<2> | ||
| RAJA::statement::For<0, RAJA::loop_exec, | ||
| RAJA::statement::For<1, RAJA::loop_exec, | ||
| RAJA::statement::Lambda<0, RAJA::Params<0>>, | ||
| RAJA::statement::For<2, RAJA::loop_exec, | ||
| RAJA::statement::Lambda<1, RAJA::Segs<0,1,2>, RAJA::Params<0>>, | ||
| RAJA::statement::Lambda<2, RAJA::Segs<0,1>, RAJA::Params<0>> | ||
| > | ||
| > | ||
| > | ||
| >; | ||
|
|
||
| startTimer(); | ||
| for (RepIndex_type irep = 0; irep < run_reps; ++irep) { | ||
|
|
||
| RAJA::kernel_param<EXEC_POL>( | ||
| RAJA::make_tuple(RAJA::RangeSegment{0, ni}, | ||
| RAJA::RangeSegment{0, nj}, | ||
| RAJA::RangeSegment{0, nk}), | ||
| RAJA::make_tuple(static_cast<Real_type>(0.0)), | ||
| RAJA::make_tuple(RAJA::RangeSegment(0, ni), | ||
| RAJA::RangeSegment(0, nj), | ||
| RAJA::RangeSegment(0, nk)), | ||
| RAJA::tuple<Real_type> {0.0}, | ||
|
|
||
| poly_2mm_lam1, | ||
| poly_2mm_lam2, | ||
| poly_2mm_lam1, | ||
| poly_2mm_lam2, | ||
| poly_2mm_lam3 | ||
| ); | ||
| ); | ||
|
|
||
| RAJA::kernel_param<EXEC_POL>( | ||
| RAJA::make_tuple(RAJA::RangeSegment{0, ni}, | ||
| RAJA::RangeSegment{0, nl}, | ||
| RAJA::RangeSegment{0, nj}), | ||
| RAJA::make_tuple(static_cast<Real_type>(0.0)), | ||
| RAJA::make_tuple(RAJA::RangeSegment(0, ni), | ||
| RAJA::RangeSegment(0, nl), | ||
| RAJA::RangeSegment(0, nj)), | ||
| RAJA::tuple<Real_type> {0.0}, | ||
|
|
||
| poly_2mm_lam4, | ||
| poly_2mm_lam5, | ||
|
|
||
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 flag should go in the scripts/lc-builds/XXX files. Also I think there is a architecture agnostic flag for (at least gnu and clang) like -march=native or something... in case the machine has SSE, AVX, AVX2 or AVX512, it will pick the best one.
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.
Yes, I saw the lc-builds file and this is where I have it now. Not sure how this slipped in..but thanks for the feedback!