MLX
 
Loading...
Searching...
No Matches
gemm.h
Go to the documentation of this file.
1// Copyright © 2025 Apple Inc.
2
3#pragma once
4#include "mlx/array.h"
5
6namespace mlx::core {
7
8template <typename T>
9void matmul(
10 const T* a,
11 const T* b,
12 T* out,
13 bool a_transposed,
14 bool b_transposed,
15 size_t lda,
16 size_t ldb,
17 size_t ldc,
18 float alpha,
19 float beta,
20 size_t batch_size,
21 const Shape& a_shape,
22 const Strides& a_strides,
23 const Shape& b_shape,
24 const Strides& b_strides);
25
26} // namespace mlx::core
Definition allocator.h:7
std::vector< ShapeElem > Shape
Definition array.h:21
std::vector< int64_t > Strides
Definition array.h:22
void matmul(const T *a, const T *b, T *out, bool a_transposed, bool b_transposed, size_t lda, size_t ldb, size_t ldc, float alpha, float beta, size_t batch_size, const Shape &a_shape, const Strides &a_strides, const Shape &b_shape, const Strides &b_strides)