Deeploy.Targets.PULPOpen.CodeTransformationPasses.PULPClusterTiling.ProfilingPULPClusterTilingGenerationDB

class Deeploy.Targets.PULPOpen.CodeTransformationPasses.PULPClusterTiling.ProfilingPULPClusterTilingGenerationDB(externalMemory: str, localMemory: str, dma: AsyncDma)

Bases: DoubleBufferingTilingCodeGeneration, ProfilingDoubleBufferingTilingMixIn

Methods

__init__(externalMemory: str, localMemory: str, dma: AsyncDma)

__init__(externalMemory, localMemory, dma)

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

Apply the CodeTransformation to an ExecutionBlock

dereferenceVars(template, varNames)

Dereference the specified variables in the given template.

extractDynamicReferences(ctxt[, ...])

Extract all dynamic references from the given execution block.

generateAllTilingCode(executionBlock, ...)

generateLoopCode(executionBlock, metaInfo, ...)

generateSetupAndTeardownCode(executionBlock, ...)

generateTilingLoop(ctxt, executionBlock, ...)

indexVars(template, varNames, index)

Index the specified variables in the given template.

injectPrintCycleDiff(executionBlock, metaInfo)

isFinalMemoryLevel(tensorMemoryConstraint)

kernelProfilingWrap(executionBlock, metaInfo)

measurementArrayDeclaration(executionBlock, ...)

Attributes

parseTreeDict

prefix

apply(ctxt: NetworkContext, executionBlock: ExecutionBlock, name: str, verbose: CodeGenVerbosity = CodeGenVerbosity(tilingProfiling=None, untiledProfiling=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]

static dereferenceVars(template: Template, varNames: List[str]) None

Dereference the specified variables in the given template.

This function modifies the provided template in place by dereferencing the variables listed in varNames. The template is modified in place.

Parameters:
  • template (Template) – The template object to be modified.

  • varNames (list of str) – List of variable names to dereference within the template.

extractDynamicReferences(ctxt: NetworkContext, executionBlock: ExecutionBlock = None, unrollStructs=False, includeGlobalReferences=False)

Extract all dynamic references from the given execution block.

Parameters:
  • ctxt (NetworkContext) – The network context.

  • executionBlock (ExecutionBlock, optional) – The execution block.

  • unrollStructs (bool, optional) – Whether to unroll structs.

  • includeGlobalReferences (bool, optional) – Whether to include global references.

Returns:

A list of dynamic references.

Return type:

List[str]

static indexVars(template: Template, varNames: List[str], index: str) None

Index the specified variables in the given template.

Modifies the template in place by indexing the specified variable names.

Parameters:
  • template (Template) – The template to modify.

  • varNames (List[str]) – The variable names to index.

  • index (str) – The index to use.