neural_compressor.torch.utils.bit_packer

Utility functions for bit packing.

Functions

register_pack_func(orig_bits, compress_bits)

Register the pack function.

pack_array_with_numba_b4_c32(→ numpy.ndarray)

Pack the array with numba when bits=4 and compress_bits=32.

pack_array_with_numba_b4_c16(→ numpy.ndarray)

Pack the array with numba when bits=4 and compress_bits=16.

pack_array_with_numba_b4_c8(→ numpy.ndarray)

Pack the array with numba when bits=4 and compress_bits=8.

pack_array_with_numba_b4_c64(→ numpy.ndarray)

Pack the array with numba when bits=4 and compress_bits=64.

pack_array_with_numba_b8_c32(→ numpy.ndarray)

Pack the array with numba when bits=8 and compress_bits=32.

pack_array_with_numba_b8_c16(→ numpy.ndarray)

Pack the array with numba when bits=8 and compress_bits=16.

pack_array_with_numba_b8_c8(→ numpy.ndarray)

Pack the array with numba when bits=8 and compress_bits=8.

pack_array_with_numba_b8_c64(→ numpy.ndarray)

Pack the array with numba when bits=8 and compress_bits=64.

pack_array_with_numba_b2_c32(→ numpy.ndarray)

Pack the array with numba when bits=2 and compress_bits=32.

pack_array_with_numba_b2_c16(→ numpy.ndarray)

Pack the array with numba when bits=2 and compress_bits=16.

pack_array_with_numba_b2_c8(→ numpy.ndarray)

Pack the array with numba when bits=2 and compress_bits=8.

pack_array_with_numba_b2_c64(→ numpy.ndarray)

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.

neural_compressor.torch.utils.bit_packer.pack_array_with_numba_b2_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=2 and compress_bits=8.

neural_compressor.torch.utils.bit_packer.pack_array_with_numba_b2_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=2 and compress_bits=64.