tilelang.quantize.lop3 module#
- tilelang.quantize.lop3.get_lop3_intrin_group(out_dtype: Literal['float16', 'int8', 'int4'], source_format: Literal['int', 'uint'] = 'uint', source_bit: int = 4, storage_dtype: Literal['int32', 'int8'] = 'int8', with_scaling: bool = False, with_zeros: bool = False, zeros_mode: Literal['original', 'rescale', 'quantized'] = 'original', storage_scope: str = 'local') Dict[str, str] #
This function is used to get the intrinsic group of the LOP3 operation to avoid the overhead of fast decoding. LOP3 is a type of logic operation that takes three inputs. The intrinsic group refers to the set of intrinsic operations that can be performed on these inputs. This function retrieves and returns this group.
- Parameters:
in_dtype (Literal["int8"]) – The data type of the input. It should be “int8”.
out_dtype (Literal["float16", "int8", "int4"]) – The data type of the output. It can be either “float16” or “int8” or “int4”.
storage_nbit (int, optional) – The number of bits used for storage. By default, it is 4.
with_scale (bool, optional) – A boolean parameter that indicates whether scaling should be applied. By default, it is False.
with_zeros (bool, optional) – A boolean parameter that indicates whether zeros should be used. By default, it is False.
zeros_mode (Literal["original", "rescale", "quantized"], optional) – The mode of zeros. It can be either “original”, “rescale”, or “quantized”. By default, it is “original”.
storage_scope (Literal["local", "warp"], optional) – The scope of the storage. It can be either “local” or “warp”. By default, it is “local”.
- Returns:
A dictionary mapping the names of the intrinsics to their corresponding implementations.
- Return type:
Dict[str, str]