blas π
Blas operations.
BlasMixin π
Mixin providing Blas operations for a Session
.
This mixin is intended to be used in combination with BaseSession
and should not be instantiated on its own.
Intended usage
class Session(BaseSession, BlasMixin): ...
sgemm π
sgemm(
m: int,
n: int,
k: int,
alpha: float,
a: list[float],
lda: int,
b: list[float],
ldb: int,
beta: float,
ldc: int,
) -> list[float]
Performs the SGEMM operation.
Wraps the vaccel_sgemm()
C operation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
| int | The number of rows in matrix A and matrix C. | required |
| int | The number of columns in matrix B and matrix C. | required |
| int | The number of columns in matrix A and rows in matrix B. | required |
| float | Scalar multiplier for the matrix product A * B. | required |
| list[float] | The matrix A in row-major order with shape (m, k). | required |
| int | The leading dimension of matrix A (usually m). | required |
| list[float] | The matrix B in row-major order with shape (k, n). | required |
| int | The leading dimension of matrix B (usually k). | required |
| float | Scalar multiplier for matrix C. | required |
| int | The leading dimension of matrix C (usually m). | required |
Returns:
Type | Description |
---|---|
list[float] | The resulting matrix C in row-major order with shape (m, n). |
Raises:
Type | Description |
---|---|
RuntimeError | If the |
FFIError | If the C operation fails. |