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

Make tests pass with -expt-extended-lambda on CUDA #108

Closed
aprokop opened this issue Oct 9, 2015 · 2 comments
Closed

Make tests pass with -expt-extended-lambda on CUDA #108

aprokop opened this issue Oct 9, 2015 · 2 comments
Assignees
Labels
Enhancement Improve existing capability; will potentially require voting

Comments

@aprokop
Copy link
Collaborator

aprokop commented Oct 9, 2015

At the moment, tests fail due to using [=] instead of KOKKOS_LAMBDA for this configuration (for instance, kokkos/core/unit_test/TestCXX11.hpp:123)

          detected during:
            instantiation of "Kokkos::Impl::cuda_parallel_launch_local_memory" based on template argument <Kokkos::Impl::ParallelFor<lam
bda [](const int &)->void, Kokkos::RangePolicy<Kokkos::Cuda::execution_space, void, void, Kokkos::DefaultExecutionSpace>>> 
:249: here
            instantiation of "Kokkos::Impl::CudaParallelLaunch<DriverType, false>::CudaParallelLaunch(const DriverType &, const dim3 &, 
const dim3 &, int, cudaStream_t) [with DriverType=Kokkos::Impl::ParallelFor<lambda [](const int &)->void, Kokkos::RangePolicy<Kokkos::Cu
da::execution_space, void, void, Kokkos::DefaultExecutionSpace>>]" 
/data/code/trilinos/kokkos/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp:463: here
            instantiation of "Kokkos::Impl::ParallelFor<FunctorType, Kokkos::RangePolicy<Arg0, Arg1, Arg2, Kokkos::Cuda>>::ParallelFor(c
onst FunctorType &, const Kokkos::Impl::ParallelFor<FunctorType, Kokkos::RangePolicy<Arg0, Arg1, Arg2, Kokkos::Cuda>>::Policy &) [with F
unctorType=lambda [](const int &)->void, Arg0=Kokkos::Cuda::execution_space, Arg1=void, Arg2=void]" 
/data/code/trilinos/kokkos/packages/kokkos/core/src/Kokkos_Parallel.hpp:238: here
            instantiation of "void Kokkos::parallel_for(size_t, const FunctorType &, const std::string &) [with FunctorType=lambda [](co
nst int &)->void]" 
/data/code/trilinos/kokkos/packages/kokkos/core/unit_test/TestCXX11.hpp:129: here
            instantiation of "double TestCXX11::AddTestLambda<DeviceType,PWRTest>() [with DeviceType=Kokkos::DefaultExecutionSpace, PWRT
est=true]" 
/data/code/trilinos/kokkos/packages/kokkos/core/unit_test/TestCXX11.hpp:272: here
            instantiation of "double TestCXX11::TestVariantLambda<DeviceType>(int) [with DeviceType=Kokkos::DefaultExecutionSpace]" 
/data/code/trilinos/kokkos/packages/kokkos/core/unit_test/TestCXX11.hpp:296: here
            instantiation of "__nv_bool TestCXX11::Test<DeviceType>(int) [with DeviceType=Kokkos::DefaultExecutionSpace]" 
/data/code/trilinos/kokkos/packages/kokkos/core/unit_test/TestDefaultDeviceType.cpp:219: here
/data/code/trilinos/kokkos/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Internal.hpp:130: error: The closure type for a lambda ("lambda [](
const team_member &)->void") cannot be used in the template argument type of a __global__ function template instantiation, unless the la
mbda is defined within a __device__ or __global__ function
@crtrott crtrott added the Enhancement Improve existing capability; will potentially require voting label Oct 29, 2015
@crtrott
Copy link
Member

crtrott commented Nov 23, 2015

Disable the tests for non-Cuda execution spaces if Cuda is enabled and experimental lambda is enabled.

@crtrott
Copy link
Member

crtrott commented Jan 14, 2016

Pushed to master

@crtrott crtrott closed this as completed Jan 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improve existing capability; will potentially require voting
Projects
None yet
Development

No branches or pull requests

4 participants