Deeploy.FutureExtension.Bindings.FutureBinding.FutureBinding

class Deeploy.FutureExtension.Bindings.FutureBinding.FutureBinding(typeChecker: NodeTypeChecker, template: NodeTemplate, codeTransformer: CodeTransformation, stateReference: Optional = None)

Bases: NodeBinding

Methods

__init__(typeChecker: NodeTypeChecker, template: NodeTemplate, codeTransformer: CodeTransformation, stateReference: Optional = None)

__init__(typeChecker, template, codeTransformer)

assignStateReferenceElement(ctxt)

bind(ctxt, node, operatorRepresentation)

Initializes the executionBlock and hoist all necessary transient buffers of the underlying NodeTemplate

codeTransform(ctxt[, verbose])

Applies the CodeTransformer's passes on the executionBlock

earlyBinding(ctxt, node, operatorRepresentation)

Initializes the executionBlock with the NodeTemplate

generate(ctxt)

Generates C Code from the encapsulated executionBlock

typeCheck(ctxt, node, operatorRepresentation)

Runs the binding-level typechecker on a node

Attributes

executionBlock

Read-only wrapper around the encapsulated execution block

nodeName

Read-only wrapper around the encapsulated node's name

typeChecker

Read-only wrapper around the encapsulated type checker

template

The kernel template you want to bind

codeTransform(ctxt: NetworkContext, verbose: CodeGenVerbosity = CodeGenVerbosity(tilingProfiling=None)) NetworkContext

Applies the CodeTransformer’s passes on the executionBlock

Parameters:
bind(ctxt: NetworkContext, node: Node, operatorRepresentation: Dict[str, str | Any]) Tuple[NetworkContext, List[str], bool]

Initializes the executionBlock and hoist all necessary transient buffers of the underlying NodeTemplate

Parameters:
  • ctxt (NetworkContext) – Current NetworkContext

  • node (gs.Node) – The node that should be bound

  • operatorRepresentation (OperatorRepresentation) – The NodeParser’s operatorRepresentation

Returns:

Updated NetworkContext, a list of names of transient buffers that were hoisted and true if binding succeeded

Return type:

Tuple[NetworkContext, List[str], bool]

earlyBinding(ctxt: NetworkContext, node: Node, operatorRepresentation: Dict[str, str | Any]) NetworkContext

Initializes the executionBlock with the NodeTemplate

Parameters:
  • ctxt (NetworkContext) – Current NetworkContext

  • node (gs.Node) – The operator this NodeBinding is associated with

  • operatorRepresentation (OperatorRepresentation) – The NodeParser’s operatorRepresentation

Returns:

Updated NetworkContext

Return type:

NetworkContext

property executionBlock

Read-only wrapper around the encapsulated execution block

generate(ctxt: NetworkContext) List[str]

Generates C Code from the encapsulated executionBlock

Parameters:

ctxt (NetworkContext) – Current NetworkContext

Returns:

A list of C Code snippets to be pasted into the final program

Return type:

List[str]

property nodeName

Read-only wrapper around the encapsulated node’s name

typeCheck(ctxt: NetworkContext, node: Node, operatorRepresentation: Dict[str, str | Any]) Tuple[NetworkContext, bool]

Runs the binding-level typechecker on a node

Parameters:
  • ctxt (NetworkContext) – Current NetworkContext

  • node (gs.Node) – The node to be typechecked

  • operatorRepresentation (OperatorRepresentation) – The NodeParser’s operatorRepresentation

Returns:

Updated and NetworkContext and true if the typing rule matches the node

Return type:

Tuple[NetworkContext, bool]

property typeChecker

Read-only wrapper around the encapsulated type checker

template

The kernel template you want to bind

Type:

NodeTemplate