| 218 | bool IsSupportedAndEnabled() { return IsSupported() && IsEnabled(); } |
| 219 | |
| 220 | void QuantizedGemm(OpKernelContext* tf_context, bool transpose_a, |
| 221 | bool transpose_b, const quint8* a_data, const quint8* b_data, |
| 222 | qint32* c_data, int m, int n, int k, int offset_a, |
| 223 | int offset_b, int lda, int ldb, int ldc) { |
| 224 | #ifdef TENSORFLOW_USE_META |
| 225 | mutex_lock library_lock(GetMutex()); |
| 226 | if (transpose_a) { |
| 227 | if (transpose_b) { |
| 228 | QuantizedGemmImpl<gemmlowp::meta::ColumnMajorWithSum, |
| 229 | gemmlowp::meta::RowMajorWithSum>( |
| 230 | tf_context, a_data, b_data, c_data, m, n, k, offset_a, offset_b, lda, |
| 231 | ldb, ldc); |
| 232 | } else { |
| 233 | QuantizedGemmImpl<gemmlowp::meta::ColumnMajorWithSum, |
| 234 | gemmlowp::meta::ColumnMajorWithSum>( |
| 235 | tf_context, a_data, b_data, c_data, m, n, k, offset_a, offset_b, lda, |
| 236 | ldb, ldc); |
| 237 | } |
| 238 | } else { |
| 239 | if (transpose_b) { |
| 240 | QuantizedGemmImpl<gemmlowp::meta::RowMajorWithSum, |
| 241 | gemmlowp::meta::RowMajorWithSum>( |
| 242 | tf_context, a_data, b_data, c_data, m, n, k, offset_a, offset_b, lda, |
| 243 | ldb, ldc); |
| 244 | } else { |
| 245 | QuantizedGemmImpl<gemmlowp::meta::RowMajorWithSum, |
| 246 | gemmlowp::meta::ColumnMajorWithSum>( |
| 247 | tf_context, a_data, b_data, c_data, m, n, k, offset_a, offset_b, lda, |
| 248 | ldb, ldc); |
| 249 | } |
| 250 | } |
| 251 | #else |
| 252 | LOG(FATAL) << "QuantizedGemm: Meta fastpath not supported."; |
| 253 | #endif |
| 254 | } |
| 255 | |
| 256 | void Requantize(OpKernelContext* tf_context, const qint32* input, int count, |
| 257 | float input_min, float input_max, float output_min, |
no test coverage detected