Deeploy.CommonExtensions.CodeTransformationPasses.Closure.MemoryAwareClosureGeneration

class Deeploy.CommonExtensions.CodeTransformationPasses.Closure.MemoryAwareClosureGeneration(closureCallTemplate: ~Deeploy.DeeployTypes.NodeTemplate = <Deeploy.DeeployTypes.NodeTemplate object>, closureSuffix='_closure', writeback: bool = True, generateStruct: bool = True, startRegion: str = 'L2', endRegion: str = 'L1')

Bases: ClosureGeneration

Methods

__init__(closureCallTemplate: ~Deeploy.DeeployTypes.NodeTemplate = <Deeploy.DeeployTypes.NodeTemplate object>, closureSuffix='_closure', writeback: bool = True, generateStruct: bool = True, startRegion: str = 'L2', endRegion: str = 'L1')

__init__([closureCallTemplate, ...])

apply(ctxt, executionBlock, name[, verbose])

Apply the CodeTransformation to an ExecutionBlock

extractDynamicReferences(ctxt[, ...])

Attributes

parseTreeDict

closureStructArgs

apply(ctxt: NetworkContext, executionBlock: ExecutionBlock, name: str, verbose: CodeGenVerbosity = CodeGenVerbosity(tilingProfiling=None)) Tuple[NetworkContext, ExecutionBlock]

Apply the CodeTransformation to an ExecutionBlock

Parameters:
  • ctxt (NetworkContext) – Current NetworkContext

  • executionBlock (ExecutionBlock) – ExecutionBlock whose code you’d like to transform

  • name (str) – Graph node name of the operator being targetted

  • verbose (CodeGenVerbosity) – Control the verbosity of code generation

Returns:

Updated NetworkContext and ExecutionBlock

Return type:

Tuple[NetworkContext, ExecutionBlock]