| 196 | |
| 197 | template <typename T, typename std::enable_if<is_floating_point<T>::value, int>::type> |
| 198 | void gemm_accumulate(const SimpleTensor<T> &a, |
| 199 | const SimpleTensor<T> &b, |
| 200 | const SimpleTensor<T> &c, |
| 201 | float alpha, |
| 202 | float beta, |
| 203 | SimpleTensor<T> &dst) |
| 204 | { |
| 205 | // Compute reference |
| 206 | SimpleTensor<T> dst_gemm = gemm(a, b, c, alpha, beta); |
| 207 | reference::arithmetic_operation<T>(reference::ArithmeticOperation::ADD, dst, dst_gemm, dst, |
| 208 | ConvertPolicy::SATURATE); |
| 209 | } |
| 210 | |
| 211 | template SimpleTensor<bfloat16> gemm(const SimpleTensor<bfloat16> &a, |
| 212 | const SimpleTensor<bfloat16> &b, |