Skip to content

TPLs: some code paths do no lead to the expected kernel due to incomplete view [type] inspection (like cublasDdot) #2598

@romintomasetti

Description

@romintomasetti

The following code seems to account for only a subset of the valid conditions:

#define KOKKOSBLAS1_DOT_TPL_SPEC_DECL_CUBLAS_EXT(ETI_SPEC_AVAIL) \
KOKKOSBLAS1_DOT_TPL_SPEC_DECL_CUBLAS(Kokkos::LayoutLeft, float, float, Kokkos::Cuda, Kokkos::CudaSpace, cublasSdot, \
ETI_SPEC_AVAIL) \
KOKKOSBLAS1_DOT_TPL_SPEC_DECL_CUBLAS(Kokkos::LayoutLeft, double, double, Kokkos::Cuda, Kokkos::CudaSpace, \
cublasDdot, ETI_SPEC_AVAIL) \
KOKKOSBLAS1_DOT_TPL_SPEC_DECL_CUBLAS(Kokkos::LayoutLeft, Kokkos::complex<float>, cuComplex, Kokkos::Cuda, \
Kokkos::CudaSpace, cublasCdotc, ETI_SPEC_AVAIL) \
KOKKOSBLAS1_DOT_TPL_SPEC_DECL_CUBLAS(Kokkos::LayoutLeft, Kokkos::complex<double>, cuDoubleComplex, Kokkos::Cuda, \
Kokkos::CudaSpace, cublasZdotc, ETI_SPEC_AVAIL)

Indeed, both

Kokkos::View<double*, Kokkos::Cuda, Kokkos::LayoutLeft>

and

Kokkos::View<double*, Kokkos::Cuda, Kokkos::LayoutRight>

should map to cublasDdot since the underlying memory is the same.

Stated in other words, the condition should probably read

Is the view layout with unit stride ?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions