#include <vector>
#include "compute/operation.h"
#include "compute/variable.h"
#include "compute/dot/dotop.h"
#include "compute/transpose/transposeop.h"
#include "tensor/tensor.h"
#include "math/matmul.h"
#include "math/dot.h"
#include "gemm_internal.h"
Go to the source code of this file.
|
template<typename T > |
MatmulOp< T > * | magmadnn::op::matmul (Operation< T > *a, Operation< T > *b, bool needs_grad) |
|
template<typename T > |
MatmulOp< T > * | magmadnn::op::matmul (T alpha, Operation< T > *a, Operation< T > *b, T beta, Tensor< T > *c, bool copy=true, bool needs_grad=true) |
|
- Author
- Daniel Nichols
- Version
- 1.0
- Date
- 2019-02-20
- Copyright
- Copyright (c) 2019
◆ matmul() [1/2]
template<typename T >
MatmulOp<T>* magmadnn::op::matmul |
( |
T |
alpha, |
|
|
Operation< T > * |
a, |
|
|
Operation< T > * |
b, |
|
|
T |
beta, |
|
|
Tensor< T > * |
c, |
|
|
bool |
copy = true , |
|
|
bool |
needs_grad = true |
|
) |
| |
Computes the full gemm C = alpha*(AB) + beta*(C). Overwrites C and returns it if copy is false. If true, then it returns a copy of C.
- Template Parameters
-
- Parameters
-
- Returns
- MatmulOp<T>*
◆ matmul() [2/2]
template<typename T >
MatmulOp< T > * magmadnn::op::matmul |
( |
Operation< T > * |
a, |
|
|
Operation< T > * |
b, |
|
|
bool |
needs_grad = true |
|
) |
| |
Returns a new operation of type matmul. It computes the matrix product of A and B.
- Template Parameters
-
- Parameters
-
- Returns
- MatmulOp<T>*