chop.nn.quantized.functional

Contents

chop.nn.quantized.functional#

chop.nn.quantized.functional.add#

chop.nn.quantized.functional.add.add_integer(x, y, config)[source]#
chop.nn.quantized.functional.add.add_binary(x, y, config)[source]#
chop.nn.quantized.functional.add.add_ternary(x, y, config)[source]#
chop.nn.quantized.functional.add.add_minifloat_denorm(x, y, config)[source]#
chop.nn.quantized.functional.add.add_minifloat_ieee(x, y, config)[source]#
chop.nn.quantized.functional.add.add_log(x, y, config)[source]#
chop.nn.quantized.functional.add.add_block_fp(x, y, config)[source]#
chop.nn.quantized.functional.add.add_block_minifloat(x, y, config)[source]#
chop.nn.quantized.functional.add.add_block_log(x, y, config)[source]#

chop.nn.quantized.functional.gelu#

chop.nn.quantized.functional.gelu.gelu_integer(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.gelu.gelu_binary(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.gelu.gelu_ternary(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.gelu.gelu_minifloat_denorm(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.gelu.gelu_minifloat_ieee(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.gelu.gelu_log(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.gelu.gelu_block_fp(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.gelu.gelu_block_minifloat(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.gelu.gelu_block_log(x, inplace=False, config=None)[source]#

chop.nn.quantized.functional.matmul#

chop.nn.quantized.functional.matmul.generic_matmul_integer(x, y, config, style='matmul', out_config=None, floor=False)[source]#
chop.nn.quantized.functional.matmul.generic_matmul_binary(x, y, config, style='matmul')[source]#
chop.nn.quantized.functional.matmul.generic_matmul_ternary(x, y, config, style='matmul')[source]#
chop.nn.quantized.functional.matmul.generic_matmul_minifloat_denorm(x, y, config, style='matmul')[source]#
chop.nn.quantized.functional.matmul.generic_matmul_minifloat_ieee(x, y, config, style='matmul')[source]#
chop.nn.quantized.functional.matmul.generic_matmul_log(x, y, config, style='matmul')[source]#
chop.nn.quantized.functional.matmul.generic_matmul_block_fp(x, y, config, style='matmul')[source]#
chop.nn.quantized.functional.matmul.generic_matmul_block_minifloat(x, y, config, style='matmul')[source]#
chop.nn.quantized.functional.matmul.generic_matmul_block_log(x, y, config, style='matmul')[source]#
chop.nn.quantized.functional.matmul.matmul_integer(x, y, config, out_config=None, floor=False)[source]#
chop.nn.quantized.functional.matmul.matmul_binary(x, y, config)[source]#
chop.nn.quantized.functional.matmul.matmul_ternary(x, y, config)[source]#
chop.nn.quantized.functional.matmul.matmul_minifloat_denorm(x, y, config)[source]#
chop.nn.quantized.functional.matmul.matmul_minifloat_ieee(x, y, config)[source]#
chop.nn.quantized.functional.matmul.matmul_log(x, y, config)[source]#
chop.nn.quantized.functional.matmul.matmul_block_fp(x, y, config)[source]#
chop.nn.quantized.functional.matmul.matmul_block_minifloat(x, y, config)[source]#
chop.nn.quantized.functional.matmul.matmul_block_log(x, y, config)[source]#
chop.nn.quantized.functional.matmul.bmm_integer(x, y, config)[source]#
chop.nn.quantized.functional.matmul.bmm_binary(x, y, config)[source]#
chop.nn.quantized.functional.matmul.bmm_ternary(x, y, config)[source]#
chop.nn.quantized.functional.matmul.bmm_minifloat_denorm(x, y, config)[source]#
chop.nn.quantized.functional.matmul.bmm_minifloat_ieee(x, y, config)[source]#
chop.nn.quantized.functional.matmul.bmm_log(x, y, config)[source]#
chop.nn.quantized.functional.matmul.bmm_block_fp(x, y, config)[source]#
chop.nn.quantized.functional.matmul.bmm_block_minifloat(x, y, config)[source]#
chop.nn.quantized.functional.matmul.bmm_block_log(x, y, config)[source]#

chop.nn.quantized.functional.mult#

chop.nn.quantized.functional.mult.mult_integer(x, y, config)[source]#
chop.nn.quantized.functional.mult.mult_binary(x, y, config)[source]#
chop.nn.quantized.functional.mult.mult_ternary(x, y, config)[source]#
chop.nn.quantized.functional.mult.mult_minifloat_denorm(x, y, config)[source]#
chop.nn.quantized.functional.mult.mult_minifloat_ieee(x, y, config)[source]#
chop.nn.quantized.functional.mult.mult_log(x, y, config)[source]#
chop.nn.quantized.functional.mult.mult_block_fp(x, y, config)[source]#
chop.nn.quantized.functional.mult.mult_block_minifloat(x, y, config)[source]#
chop.nn.quantized.functional.mult.mult_block_log(x, y, config)[source]#

chop.nn.quantized.functional.relu#

chop.nn.quantized.functional.relu.relu_integer(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.relu.relu_binary(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.relu.relu_ternary(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.relu.relu_minifloat_denorm(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.relu.relu_minifloat_ieee(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.relu.relu_log(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.relu.relu_block_fp(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.relu.relu_block_minifloat(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.relu.relu_block_log(x, inplace=False, config=None)[source]#

chop.nn.quantized.functional.selu#

chop.nn.quantized.functional.selu.selu_integer(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.selu.selu_binary(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.selu.selu_ternary(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.selu.selu_minifloat_denorm(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.selu.selu_minifloat_ieee(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.selu.selu_log(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.selu.selu_block_fp(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.selu.selu_block_minifloat(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.selu.selu_block_log(x, inplace=False, config=None)[source]#

chop.nn.quantized.functional.softermax#

chop.nn.quantized.functional.softermax.fixed_softermax(input: Tensor, q_config: dict = None, out_q_config: dict = None, dim: int = 0) Tensor[source]#

Fixed-point softermax implementation, according to “Softermax: Hardware/Software Co-Design of an Efficient Softmax for Transformers” paper (https://arxiv.org/abs/2103.09301).

Parameters:

input (Tensor) – Input tensor

Returns:

Output tensor

Return type:

Tensor

chop.nn.quantized.functional.softplus#

chop.nn.quantized.functional.softplus.softplus_integer(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.softplus.softplus_binary(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.softplus.softplus_ternary(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.softplus.softplus_minifloat_denorm(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.softplus.softplus_minifloat_ieee(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.softplus.softplus_log(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.softplus.softplus_block_fp(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.softplus.softplus_block_minifloat(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.softplus.softplus_block_log(x, inplace=False, config=None)[source]#

chop.nn.quantized.functional.softsign#

chop.nn.quantized.functional.softsign.softsign_integer(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.softsign.softsign_binary(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.softsign.softsign_ternary(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.softsign.softsign_minifloat_denorm(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.softsign.softsign_minifloat_ieee(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.softsign.softsign_log(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.softsign.softsign_block_fp(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.softsign.softsign_block_minifloat(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.softsign.softsign_block_log(x, inplace=False, config=None)[source]#

chop.nn.quantized.functional.sub#

chop.nn.quantized.functional.sub.sub_integer(x, y, config)[source]#
chop.nn.quantized.functional.sub.sub_binary(x, y, config)[source]#
chop.nn.quantized.functional.sub.sub_ternary(x, y, config)[source]#
chop.nn.quantized.functional.sub.sub_minifloat_denorm(x, y, config)[source]#
chop.nn.quantized.functional.sub.sub_minifloat_ieee(x, y, config)[source]#
chop.nn.quantized.functional.sub.sub_log(x, y, config)[source]#
chop.nn.quantized.functional.sub.sub_block_fp(x, y, config)[source]#
chop.nn.quantized.functional.sub.sub_block_minifloat(x, y, config)[source]#
chop.nn.quantized.functional.sub.sub_block_log(x, y, config)[source]#

chop.nn.quantized.functional.tanh#

chop.nn.quantized.functional.tanh.tanh_integer(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.tanh.tanh_binary(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.tanh.tanh_ternary(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.tanh.tanh_minifloat_denorm(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.tanh.tanh_minifloat_ieee(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.tanh.tanh_log(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.tanh.tanh_block_fp(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.tanh.tanh_block_minifloat(x, inplace=False, config=None)[source]#
chop.nn.quantized.functional.tanh.tanh_block_log(x, inplace=False, config=None)[source]#