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

CUDA9: compiler error with static assert template arguments #1190

Closed
crtrott opened this issue Oct 25, 2017 · 0 comments
Closed

CUDA9: compiler error with static assert template arguments #1190

crtrott opened this issue Oct 25, 2017 · 0 comments
Assignees
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos) Compiler Issue An issue that Kokkos cannot / should not fix; Kokkos must communicate to relevant vendor
Milestone

Comments

@crtrott
Copy link
Member

crtrott commented Oct 25, 2017

We have a unit-test which doesn't compile with CUDA9 because of some error in a static assert.

The code is:

  typedef Kokkos::View< int***[13][14], Kokkos::LayoutLeft, ExecSpace >  DLT;
  typedef Kokkos::Subview< DLT, range, int, int, int, int >  DLS1;

  static_assert( DLS1::rank == 1 && std::is_same< typename DLS1::array_layout, Kokkos::LayoutLeft >::value
               , "Subview layout error for rank 1 subview of left-most range of LayoutLeft" );

The error is:

/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:220: error: expansion pattern ‘Kokkos::pair<int, int>’ contains no argument packs
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:228: error: expansion pattern ‘int’ contains no argument packs
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:236: error: expansion pattern ‘int’ contains no argument packs
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:244: error: expansion pattern ‘int’ contains no argument packs
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:252: error: expansion pattern ‘int’ contains no argument packs
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:255: error: template argument 3 is invalid
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:255: error: template argument 4 is invalid
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:255: error: template argument 5 is invalid
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:255: error: template argument 6 is invalid
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:255: error: template argument 7 is invalid
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:263: error: expected template-argument before ‘::’ token
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:263: error: expected ‘>’ before ‘::’ token
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:297: error: wrong number of template arguments (1, should be 2)
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:301: error: expected ‘(’ before ‘value’
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:301: error: expected ‘)’ before ‘value’
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:384: error: expected ‘,’ before ‘;’ token
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:384: error: expected string-literal before ‘;’ token
/home/crtrott/Kokkos/kokkos/core/unit_test/TestViewMapping_subview.hpp:82:384: error: expected ‘)’ before ‘;’ token

I am putting a #if !defined(KOKKOS_IMPL_CUDA_VERSION_9_WORKAROUND) in as a workaround.

@crtrott crtrott added Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos) Compiler Issue An issue that Kokkos cannot / should not fix; Kokkos must communicate to relevant vendor labels Oct 25, 2017
@crtrott crtrott self-assigned this Oct 25, 2017
crtrott added a commit that referenced this issue Oct 25, 2017
@ibaned ibaned added this to the 2017 December milestone Oct 31, 2017
@crtrott crtrott closed this as completed Dec 15, 2017
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) Compiler Issue An issue that Kokkos cannot / should not fix; Kokkos must communicate to relevant vendor
Projects
No open projects
Development

No branches or pull requests

2 participants