Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
check if MKL in BUILD_TAG in test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Li, Hao H committed Dec 10, 2018
1 parent 1f98f63 commit cf527e0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/operator/quantization/quantized_fully_connected.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ struct QuantizedSumInitKernelWithBias {
out[i] = bias[i] * float_for_one_bias_quant /
float_for_one_out_quant;
} else {
LOG(INFO) << "WARNING: float_for_one_out_quant is 0, need to check min/max data !";
LOG(INFO) << "float_for_one_out_quant is 0, need to check min/max data !";
out[i] = 0;
}
}
Expand Down
11 changes: 9 additions & 2 deletions tests/python/quantization/test_quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,15 @@ def check_quantized_pooling(data_shape, kernel, pool_type, pad, stride, global_p
def test_quantized_fc():
def check_quantized_fc(data_shape, num_hidden, no_bias, qdtype, flatten=True):
if mx.current_context().device_type != 'gpu':
print('skipped testing quantized_fc on cpu since s8u8s32 is only supported by MKL BLAS library')
return
hasMKL = False;
for key in os.environ.keys():
if cmp(key, "BUILD_TAG") == 0:
if os.environ['BUILD_TAG'].find("MKL") != -1:
hasMKL = True
break
if hasMKL == False:
print('skipped testing quantized_fc on cpu since s8u8s32 is only supported by MKL BLAS library')
return
elif qdtype == 'uint8' and is_test_for_gpu():
print('skipped testing quantized_fc for gpu uint8 since it is not supported yet')
return
Expand Down

0 comments on commit cf527e0

Please sign in to comment.