gemv_native.hh
Go to the documentation of this file.
1#pragma once
2
3// Native batched GEMV. No is_gpu gate: Direct must build for native_cpu, so keep
4// this TU out of NO_CPU_TARGETS. evidence: docs/perf/gemv.md#the-five-kernel-bodies
5// m == 0, n == 0 or (alpha == 0 && beta == 1) leaves Y untouched; A unread at alpha == 0.
6
7#include <src/util/internal-api.hh>
11
13
14// Compiled into this build? Not a device query -- gates can_run for native.
15template <typename T>
16BATCHLAS_INTERNAL_API bool gemv_direct_available();
17
18template <typename T>
19BATCHLAS_INTERNAL_API bool gemv_cta_available();
20
21template <typename T>
24 const VectorView<T>& X,
25 const VectorView<T>& Y,
26 T alpha,
27 T beta,
28 Transpose transA);
29
30// transA MUST NOT be NoTrans; a direct caller that violates it gets a throw.
31template <typename T>
34 const VectorView<T>& X,
35 const VectorView<T>& Y,
36 T alpha,
37 T beta,
38 Transpose transA);
39
40// TEST-ONLY, launcher's own gate: 1 = body 3, W >= 2 = body 5 at W; pass A.cols()*batch.
41template <typename T>
42BATCHLAS_INTERNAL_API int gemv_seg_trans_width_debug(Queue& ctx, int red_len, int64_t out_len_times_batch);
43
44} // namespace batchlas::sycl_gemv
Non-owning view of a batch of matrices: the argument type of every entry point.
Definition matrix.hh:485
Non-owning view of a batch of strided vectors: the vector argument type of the entry points.
Definition matrix.hh:1754
Enumerations, scalar traits and scalar concepts shared by every public header.
Transpose
The operator op() applied to an operand: op(A) = A, A^T or A^H.
Definition enums.hh:171
The batched containers: Matrix (owning), MatrixView (non-owning), KernelMatrixView (device-side),...
Event gemv_native_cta(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const VectorView< T > &X, const VectorView< T > &Y, T alpha, T beta, Transpose transA)
Event gemv_native_direct(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const VectorView< T > &X, const VectorView< T > &Y, T alpha, T beta, Transpose transA)
BATCHLAS_INTERNAL_API bool gemv_cta_available()
BATCHLAS_INTERNAL_API bool gemv_direct_available()
BATCHLAS_INTERNAL_API int gemv_seg_trans_width_debug(Queue &ctx, int red_len, int64_t out_len_times_batch)
Completion handle of enqueued work, returned by every entry point.
Where BatchLAS work runs: a device, a backend, an ordered SYCL queue and a workspace arena.
batchlas::Device, batchlas::Event and batchlas::Queue: where work runs and how it is ordered.