hls4ml.backends.fpga.passes package

Submodules

hls4ml.backends.fpga.passes.bn_quant module

class hls4ml.backends.fpga.passes.bn_quant.BatchNormalizationQuantizedTanhConfigTemplate

Bases: hls4ml.backends.template.LayerConfigTemplate

format(node)
class hls4ml.backends.fpga.passes.bn_quant.BatchNormalizationQuantizedTanhFunctionTemplate

Bases: hls4ml.backends.template.FunctionCallTemplate

format(node)
class hls4ml.backends.fpga.passes.bn_quant.MergeBatchNormAndQuantizedTanh

Bases: hls4ml.model.optimizer.optimizer.OptimizerPass

match(node)

Predicate to match on a given node.

Parameters

node (Layer) – Node in the model graph to try matching the optimizer on.

transform(model, node)

Transformation to apply if matching was successful.

Transform should return a boolean value indicating if the model graph was altered (by adding/removing nodes).

Parameters
  • model (ModelGraph) – Model to optimize

  • node (Layer) – The matched node in the model graph.

class hls4ml.backends.fpga.passes.bn_quant.QuantizeDenseOutput

Bases: hls4ml.model.optimizer.optimizer.OptimizerPass

match(node)

Predicate to match on a given node.

Parameters

node (Layer) – Node in the model graph to try matching the optimizer on.

transform(model, node)

Transformation to apply if matching was successful.

Transform should return a boolean value indicating if the model graph was altered (by adding/removing nodes).

Parameters
  • model (ModelGraph) – Model to optimize

  • node (Layer) – The matched node in the model graph.

hls4ml.backends.fpga.passes.bn_quant.register_bn_quant(backend)

hls4ml.backends.fpga.passes.embedding module

class hls4ml.backends.fpga.passes.embedding.EmbeddingConfigTemplate

Bases: hls4ml.backends.template.LayerConfigTemplate

format(node)
class hls4ml.backends.fpga.passes.embedding.EmbeddingFunctionTemplate

Bases: hls4ml.backends.template.FunctionCallTemplate

format(node)

Module contents