@@ -103,6 +103,7 @@ Status FirefoxMatMulInteger8::Compute(OpKernelContext* ctx) const {
103
103
gemm_shape.BIsSigned = b_is_signed;
104
104
105
105
const size_t batch_size = helper.OutputOffsets ().size ();
106
+
106
107
std::vector<MLAS_GEMM_QUANT_DATA_PARAMS> gemm_data_vec (batch_size);
107
108
108
109
for (size_t batch = 0 ; batch < batch_size; batch++) {
@@ -118,7 +119,6 @@ Status FirefoxMatMulInteger8::Compute(OpKernelContext* ctx) const {
118
119
gemm_params.B = b_data + helper.RightOffsets ()[batch];
119
120
gemm_params.C = y_data + helper.OutputOffsets ()[batch];
120
121
}
121
-
122
122
#if 0
123
123
std::cout << "Matrix A (sample):\n";
124
124
for (size_t i = 0; i < 5; ++i) {
@@ -147,7 +147,6 @@ Status FirefoxMatMulInteger8::Compute(OpKernelContext* ctx) const {
147
147
} else {
148
148
std::cout << "b_zero_point is null\n";
149
149
}
150
-
151
150
#endif
152
151
// auto start_matmul = Clock::now();
153
152
int8Multiply (
@@ -161,7 +160,7 @@ Status FirefoxMatMulInteger8::Compute(OpKernelContext* ctx) const {
161
160
reinterpret_cast <float *>(y_data)
162
161
);
163
162
// auto end_matmul = Clock::now();
164
- // auto matmul_time = std::chrono::duration_cast<Microseconds>(end_matmul - start_matmul).count();
163
+ // auto matmul_time = std::chrono::duration_cast<Microseconds>(end_matmul - start_matmul).count();
165
164
166
165
// rowsA = M
167
166
// width = K
@@ -191,20 +190,18 @@ Status FirefoxMatMulInteger8::Compute(OpKernelContext* ctx) const {
191
190
outputPtr[rowIndex * colsB + colIndex] = tempResult;
192
191
}
193
192
}
194
- #endif
195
193
196
- /*
197
194
// Mlas (will fallback if we don't meet requirements)
198
195
auto start_mblas = Clock::now();
199
196
MlasGemmBatch(gemm_shape, gemm_data_vec.data(), batch_size, ctx->GetOperatorThreadPool());
200
197
auto end_mblas = Clock::now();
201
198
auto mblas_time = std::chrono::duration_cast<Microseconds>(end_mblas - start_mblas).count();
202
- */
203
199
// Output timing results
204
- // std::cout << "Timing (microseconds):\n";
205
- // std::cout << "MatMulFull: " << matmul_time << "\n";
206
- // std::cout << "MlasGemmBatch: " << mblas_time << "\n";
200
+ std::cout << "Timing (microseconds):\n";
201
+ std::cout << "MatMulFull: " << matmul_time << "\n";
202
+ std::cout << "MlasGemmBatch: " << mblas_time << "\n";
207
203
204
+ #endif
208
205
return Status::OK ();
209
206
}
210
207
0 commit comments