17#if UNI20_HAS_MPLAPACK_FLOAT80
21#if UNI20_BACKEND_BLAS || UNI20_HAS_MPLAPACK_MPREAL
25#if UNI20_BACKEND_CUBLAS
46template <
class BackendSelector, uni20::MutableRankedTensorView<2> OutputTensor,
class Alpha,
class Beta,
47 uni20::RankedTensorView<2> LhsTensor, uni20::RankedTensorView<2> RhsTensor>
48 requires(OperationScalar<Alpha, tensor_element_t<OutputTensor>> &&
49 OperationScalar<Beta, tensor_element_t<OutputTensor>>)
50void gemm(BackendSelector&& selector, OutputTensor&& output, Alpha alpha, LhsTensor
const& lhs, RhsTensor
const& rhs,
51 Beta
beta, std::optional<Precision> requested = {})
60 detail::dispatch_at_precision<scalar_type>(std::forward<BackendSelector>(selector), gemm_op{},
p, output_span,
61 scalar_type(alpha), lhs_span, rhs_span, beta_scalar);
62 uni20::detail::record_output_precision(output,
p);
66template <uni20::MutableRankedTensorView<2> OutputTensor,
class Alpha,
class Beta, uni20::RankedTensorView<2> LhsTensor,
67 uni20::RankedTensorView<2> RhsTensor>
68 requires(OperationScalar<Alpha, tensor_element_t<OutputTensor>> &&
69 OperationScalar<Beta, tensor_element_t<OutputTensor>>)
70void gemm(OutputTensor&& output, Alpha alpha, LhsTensor
const& lhs, RhsTensor
const& rhs, Beta
beta,
71 std::optional<Precision>
p = {})
74 gemm(selector, std::forward<OutputTensor>(output), alpha, lhs, rhs,
beta,
p);
Operation-tag backend dispatch over tensor-view operands.
BLAS backend adapter for operation-tag GEMM dispatch.
Reference CPU GEMM backend for tensor-view operands.
cuBLAS backend adapter for provider-ready GEMM dispatch.
Definition linalg/async.hpp:28
void gemm(BackendSelector selector, async::Async< OutputTensor > &output, Alpha &&alpha, async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs, Beta &&beta, std::optional< Precision > p={})
Schedule fixed-output GEMM with an explicit backend selector.
Definition async/matrix_product.hpp:162
constexpr auto select_backend(Operation const &operation, FirstTensor const &, RestTensors const &...)
Select the default backend list for an operation on Tensor operands.
Definition backend_selector.hpp:252
Definition data_table.cpp:8
constexpr Precision precision_of(T const &value)
Read scalar precision without changing any scalar or provider state.
Definition runtime_precision.hpp:53
constexpr Precision common_precision(Precision a, Precision b)
Combine precisions, treating exact values as neutral and rejecting unequal finite precisions.
Definition core/precision.hpp:57
constexpr Precision common_default_precision(A const &a, B const &b)
Select a binary operation's default without inspecting element precisions.
Definition tensor/precision.hpp:43
constexpr decltype(auto) mdspec_of(Tensor &tensor) noexcept(noexcept(tensor.mdspec()))
Return a tensor's immediate or descriptor-backed multidimensional metadata.
Definition tensor/concepts.hpp:50
std::remove_cv_t< typename tensor_mdspec_t< T >::element_type > tensor_element_t
Scalar value type exposed by a tensor-level object.
Definition tensor/concepts.hpp:126
mpreal beta(mpreal const &a, mpreal const &x)
Real Beta function; positive rational/integer pairs retain exact values.
Definition mpreal_special.hpp:164
Numeric coefficient sources shared by synchronous and asynchronous operations.
Trait to extract the scalar type from a type T.
Definition scalar_traits.hpp:93
Concepts for tensor-level objects that resolve mdspan kernel operands.
Shape preparation contracts for tensor operation outputs.