Skip to content
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

TeamPolicy doesn't throw then created with non-viable vector length and also doesn't backscale to viable one #2020

Closed
crtrott opened this issue Mar 7, 2019 · 2 comments
Assignees
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)

Comments

@crtrott
Copy link
Member

crtrott commented Mar 7, 2019

This code doesn't behave well for V>32 on NVIDIA GPUs:

#include<Kokkos_Core.hpp>

int main(int argc, char* argv[]) {
  Kokkos::initialize(argc,argv);
  {
     int T = (argc>1) ? atoi(argv[1]) : 16;
     int V = (argc>2) ? atoi(argv[2]) : 1;

     Kokkos::parallel_for(Kokkos::TeamPolicy<>(1,T,V), KOKKOS_LAMBDA (const Kokkos::TeamPolicy<>::member_type& team) {
       double val = 0;
       if(team.team_rank()==1) val = 5;
       team.team_reduce(Kokkos::Sum<double,Kokkos::DefaultExecutionSpace>(val));
       if(team.team_rank()==0) printf("%lf\n",val);
     });
  }
  Kokkos::finalize();
}

Probably the vector length should just be dropped down to the maximum possible, since this is more like a hint and the user doesn't have explicit access to vector lanes anyway.

@crtrott crtrott added Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos) Blocks Promotion Overview issue for release-blocking bugs labels Mar 7, 2019
@jeffmiles63
Copy link
Contributor

Created PR #2067 to address this issue

@crtrott
Copy link
Member Author

crtrott commented Apr 6, 2019

I think this should mostly not warn, and we treat the vector length as more something like a hint a la "might be a good vector length" what do you guys think?

crtrott added a commit that referenced this issue Apr 10, 2019
change TeamPolicyInternal to convert the vector_length (Issue #2020)
@crtrott crtrott added bug - fix pushed to develop branch and removed Blocks Promotion Overview issue for release-blocking bugs labels Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Projects
None yet
Development

No branches or pull requests

4 participants