kokkos / kokkos-kernels

Kokkos C++ Performance Portability Programming Ecosystem: Math Kernels - Provides BLAS, Sparse BLAS and Graph Kernels
Other
304 stars 96 forks source link

eti-only and blas testing scopes with layout stride #313

Open kyungjoo-kim opened 6 years ago

kyungjoo-kim commented 6 years ago

Currently, eti-only is not really optional. It should be eti-only to compile KK within a reasonable time. With eti-only option, it instanciates layout left and right and there is no mechanism to instanciate layout stride in the Makefile.kokkos-kernels. This may not be a problem but it could be problematic.

  1. KK only provides eti-only interface. For example, if I want to use "dot" with layout stride views, I got the following undefined error

    undefined reference to `                                                                                                                          
    KokkosBlas::Impl::Dot<                                                                                                                            
    Kokkos::View<double, Kokkos::LayoutLeft, Kokkos::HostSpace, Kokkos::MemoryTraits<1u> >,                                                        
    Kokkos::View<double const*, Kokkos::LayoutStride, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>, Kokkos::MemoryTraits<1u> >,               
    Kokkos::View<double const*, Kokkos::LayoutStride, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>, Kokkos::MemoryTraits<1u> >,               
    1, 1, false, false>::dot 

    This is a reasonable use case and blas function either use tpls or kokkos native implementation for this case.

  2. KK test suite only test eti-only interface. Test coverage is significantly reduced as we limit testing for eti data types and array layouts. When I remove eti-only, there are several test failures. e.g.,

    [  FAILED  ] serial.abs_mv_float (372 ms)
    [  FAILED  ] serial.team_abs_mv_float (276 ms)
    [  FAILED  ] serial.team_mult_double_mv_int (693 ms)
    [  FAILED  ] serial.mult_double_mv_int (754 ms)
    [  FAILED  ] serial.reciprocal_float (69 ms)
    etc..
  3. I am not very familiar with eti system but KK should be compiled with different types of view combinations and when eti is not available, it should be able to redirect the code path to generic implementations.

ndellingwood commented 6 years ago

Labeled as bug, please relabel as enhancement if that is more appropriate.

srajama1 commented 6 years ago

I think this will be a revamp and require considerable work, let us not block Trilinos update with this.

crtrott commented 5 years ago

Your number 3 is true: if you don't enable eti-only you can instantiate anything.