vta.transform#

Additional Transformation Passes. for VTA

Functions#

AnnotateALUCoProcScope()

Pass to insert ALU instruction.

CPUAccessRewrite()

Detect CPU access to VTA buffer and get address correctly.

FoldUopLoop()

Detect and fold uop loop.

InjectALUIntrin()

Pass to inject ALU micro-ops.

InjectCoProcSync()

Pass inject coproc sync

InjectConv2DTransposeSkip()

Pass to skip 0-weights in conv2d transpose with stride > 1.

InjectDMAIntrin()

Pass to inject DMA copy intrinsics.

InjectSkipCopy()

Pass to inject skip copy stmt, used for debug purpose.

LiftAllocToScopeBegin()

Lift allocate to beginning of the current scope.

_get_gemm_intrin_buffer()

_match_pragma(stmt, key)

Internal helper to match stmt to pragma stmt.

Module Contents#

vta.transform.AnnotateALUCoProcScope()[源代码]#

Pass to insert ALU instruction.

Returns#

fpasstvm.transform.Pass

The pass

vta.transform.CPUAccessRewrite()[源代码]#

Detect CPU access to VTA buffer and get address correctly.

VTA's buffer is an opaque handle that do not correspond to address in CPU. This pass detect CPU access and rewrite to use pointer returned VTABufferCPUPtr for CPU access.

Returns#

fpasstvm.transform.Pass

The pass

vta.transform.FoldUopLoop()[源代码]#

Detect and fold uop loop.

VTA support uop programming model that recognizes loop structure. This pass detect the loop structure and extract that into uop loop AST.

Returns#

fpasstvm.transform.Pass

The pass

vta.transform.InjectALUIntrin()[源代码]#

Pass to inject ALU micro-ops.

Returns#

fpasstvm.transform.Pass

The pass

vta.transform.InjectCoProcSync()[源代码]#

Pass inject coproc sync

Returns#

fpasstvm.transform.Pass

The pass

vta.transform.InjectConv2DTransposeSkip()[源代码]#

Pass to skip 0-weights in conv2d transpose with stride > 1.

Returns#

fpasstvm.transform.Pass

The pass

vta.transform.InjectDMAIntrin()[源代码]#

Pass to inject DMA copy intrinsics.

Returns#

fpasstvm.transform.Pass

The pass

vta.transform.InjectSkipCopy()[源代码]#

Pass to inject skip copy stmt, used for debug purpose.

Returns#

fpasstvm.transform.Pass

The pass

vta.transform.LiftAllocToScopeBegin()[源代码]#

Lift allocate to beginning of the current scope.

Returns#

fpasstvm.transform.Pass

The pass

vta.transform._get_gemm_intrin_buffer()[源代码]#
vta.transform._match_pragma(stmt, key)[源代码]#

Internal helper to match stmt to pragma stmt.

Parameters#

stmtStmt

The AttrStmt

keystr

The pragma key