neural_compressor.torch.utils.bit_packer
Utility functions for bit packing.
Functions
|
Register the pack function. |
|
Pack the array with numba when bits=4 and compress_bits=32. |
|
Pack the array with numba when bits=4 and compress_bits=16. |
|
Pack the array with numba when bits=4 and compress_bits=8. |
|
Pack the array with numba when bits=4 and compress_bits=64. |
|
Pack the array with numba when bits=8 and compress_bits=32. |
|
Pack the array with numba when bits=8 and compress_bits=16. |
|
Pack the array with numba when bits=8 and compress_bits=8. |
|
Pack the array with numba when bits=8 and compress_bits=64. |
|
Pack the array with numba when bits=2 and compress_bits=32. |
|
Pack the array with numba when bits=2 and compress_bits=16. |
|
Pack the array with numba when bits=2 and compress_bits=8. |
|
Pack the array with numba when bits=2 and compress_bits=64. |
Module Contents
- neural_compressor.torch.utils.bit_packer.register_pack_func(orig_bits: int, compress_bits: int)[source]
Register the pack function.
- neural_compressor.torch.utils.bit_packer.pack_array_with_numba_b4_c32(raw_array: numpy.ndarray, packed_array: numpy.ndarray, n_pack: int, new_in_features: int) numpy.ndarray [source]
Pack the array with numba when bits=4 and compress_bits=32.
- neural_compressor.torch.utils.bit_packer.pack_array_with_numba_b4_c16(raw_array: numpy.ndarray, packed_array: numpy.ndarray, n_pack: int, new_in_features: int) numpy.ndarray [source]
Pack the array with numba when bits=4 and compress_bits=16.
- neural_compressor.torch.utils.bit_packer.pack_array_with_numba_b4_c8(raw_array: numpy.ndarray, packed_array: numpy.ndarray, n_pack: int, new_in_features: int) numpy.ndarray [source]
Pack the array with numba when bits=4 and compress_bits=8.
- neural_compressor.torch.utils.bit_packer.pack_array_with_numba_b4_c64(raw_array: numpy.ndarray, packed_array: numpy.ndarray, n_pack: int, new_in_features: int) numpy.ndarray [source]
Pack the array with numba when bits=4 and compress_bits=64.
- neural_compressor.torch.utils.bit_packer.pack_array_with_numba_b8_c32(raw_array: numpy.ndarray, packed_array: numpy.ndarray, n_pack: int, new_in_features: int) numpy.ndarray [source]
Pack the array with numba when bits=8 and compress_bits=32.
- neural_compressor.torch.utils.bit_packer.pack_array_with_numba_b8_c16(raw_array: numpy.ndarray, packed_array: numpy.ndarray, n_pack: int, new_in_features: int) numpy.ndarray [source]
Pack the array with numba when bits=8 and compress_bits=16.
- neural_compressor.torch.utils.bit_packer.pack_array_with_numba_b8_c8(raw_array: numpy.ndarray, packed_array: numpy.ndarray, n_pack: int, new_in_features: int) numpy.ndarray [source]
Pack the array with numba when bits=8 and compress_bits=8.
- neural_compressor.torch.utils.bit_packer.pack_array_with_numba_b8_c64(raw_array: numpy.ndarray, packed_array: numpy.ndarray, n_pack: int, new_in_features: int) numpy.ndarray [source]
Pack the array with numba when bits=8 and compress_bits=64.
- neural_compressor.torch.utils.bit_packer.pack_array_with_numba_b2_c32(raw_array: numpy.ndarray, packed_array: numpy.ndarray, n_pack: int, new_in_features: int) numpy.ndarray [source]
Pack the array with numba when bits=2 and compress_bits=32.
- neural_compressor.torch.utils.bit_packer.pack_array_with_numba_b2_c16(raw_array: numpy.ndarray, packed_array: numpy.ndarray, n_pack: int, new_in_features: int) numpy.ndarray [source]
Pack the array with numba when bits=2 and compress_bits=16.