neural_compressor.experimental.strategy.utils.utility

Tuning utility.

Module Contents

Classes

OrderedDefaultDict

Ordered default dict.

Functions

extract_data_type(→ str)

Extract data type and signed from data type.

reverted_data_type(→ str)

Revert the data type.

get_adaptor_name(adaptor)

Get adaptor name.

class neural_compressor.experimental.strategy.utils.utility.OrderedDefaultDict[source]

Ordered default dict.

neural_compressor.experimental.strategy.utils.utility.extract_data_type(data_type: str) str[source]

Extract data type and signed from data type.

Parameters:

data_type – The original data type such as uint8, int8.

Returns:

(signed or unsigned, data type without signed)

neural_compressor.experimental.strategy.utils.utility.reverted_data_type(signed_flag: str, data_type: str) str[source]

Revert the data type.

neural_compressor.experimental.strategy.utils.utility.get_adaptor_name(adaptor)[source]

Get adaptor name.

Parameters:

adaptor – adaptor instance.