Matrix product always falls back to native implementation
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 167
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to implement HPX backend for matrix_product.
I am not certainly clear with this section of code (below).
The following always evalutes to false right ?
Because both qualified lookup and unqualified lookup of matrix_product return void, so the second part of the expression always evaluates to false and hence whole std::enable_if_t is false.
template <class Exec, class A_t, class B_t, class C_t>
struct is_custom_matrix_product_avail<
Exec, A_t, B_t, C_t,
std::enable_if_t<
std::is_void_v<
decltype(
matrix_product(
std::declval<Exec>(),
std::declval<A_t>(),
std::declval<B_t>(),
std::declval<C_t>()))
>
&& !std::is_same_v< // see #218
decltype(
std::experimental::linalg::matrix_product(
std::declval<Exec>(),
std::declval<A_t>(),
std::declval<B_t>(),
std::declval<C_t>())),
decltype(
matrix_product(
std::declval<Exec>(),
std::declval<A_t>(),
std::declval<B_t>(),
std::declval<C_t>()))
>
&& !linalg::impl::is_inline_exec_v<Exec>
>
>
: std::true_type{};
Which makes this : https://github.com/kokkos/stdBLAS/blob/main/include/experimental/__p1673_bits/blas3_matrix_product.hpp#L757 always false and hence falls backs to native sequential implementation.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read include/experimental/__p1673_bits/blas3_matrix_product.hpp around line 757 and trace is_custom_matrix_product_avail for an HPX execution type. Confirm how qualified and unqualified matrix_product lookup behaves, then determine why the custom path is rejected. Done means the HPX backend can be selected instead of always falling back to the native sequential implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100