pengzhao-intel commented on a change in pull request #14094: Enhance gpu
quantization
URL: https://github.com/apache/incubator-mxnet/pull/14094#discussion_r254980765
##########
File path: python/mxnet/contrib/quantization.py
##########
@@ -499,6 +499,9 @@ def quantize_model(sym, arg_params, aux_params,
if quantized_dtype not in ('int8', 'uint8'):
raise ValueError('unknown quantized_dtype %s received,'
' expected `int8` or `uint8`' % quantized_dtype)
+ if quantized_dtype == 'uint8' and ctx != cpu():
+ raise ValueError('currently gpu does not support uint8 quantization,'
+ ' please set quantized_dtype to int8')
Review comment:
How about the something like below?
“Currently, uint8 quantization is only supported by CPU, please switch to
the context of CPU or int8 data type for GPU"
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services