TransferModeType#
Fully qualified name: cupva::TransferModeType
Defined in src/host/shared/include/install/cupva_host_common.hpp
-
enum class cupva::TransferModeType : uint32_t#
SequenceDataFlowTransfer sequencing mode.
SequencingType specifies the boundaries where a SequenceDataFlow must be triggered or synced.
SequenceDataFlows are sequenced in device code as follows:
When cupvaSQDFOpen() is called, the SequenceDataFlow is idle. When a SequenceDataFlow is idle:
User may call cupvaSQDFClose() to permanently close the SequenceDataFlow
User may call cupvaSQDFFlushAndTrig() to flush pending updates and trigger the SequenceDataFlow. Further updates may not be added until the next call to cupvaSQDFSync().
User may call cupvaSQDFTrig() to trigger without flushing pending updates.
After triggering with either cupvaSQDFFlushAndTrig() or cupvaSQDFTrig(), user must call cupvaSQDFSync(). This will block until a point determined by the TransferMode of the transfers. For example:
If all transfers are CONTINUOUS, the SequenceDataFlow will be idle after cupvaSQDFSync().
If the first transfer is TILE, the first tile of the first transfer will have been transferred after cupvaSQDFSync().
cupvaSQDFTrig/Sync() are called as necessary to complete the sequence. See examples below.
Once the sequence has completed, the SequenceDataFlow is again idle and may be closed, triggered, or triggered with updates being flushed. The SequenceDataFlow must eventually be closed before VPU code exits.
Some examples follow.
// If all SequenceDataFlowTransfers are CONTINUOUS, all transfers will automatically commence // by calling cupvaSQDFTrig()/cupvaSQDFFlushAndTrig(). It is required to call cupvaSQDFSync() // to complete the sequence. // Sequence order // │╭────────────╮◀─Trig/FlushAndTrig // ││ CONTINUOUS │ // │╰────────────╯ // │╭────────────╮ // ││ CONTINUOUS │ // │╰────────────╯ // │╭────────────╮ // ││ CONTINUOUS │ // │╰────────────╯─▶Sync // ▼
// The amount of data transferred by triggers depends on the sequencing mode of the // SequenceDataFlowTransfers. For example, a chain of TRANSFER level sequencing: // Sequence order // │╭────────────╮◀─Trig/FlushAndTrig // ││ TRANSFER │ // │╰────────────╯─▶Sync // │╭────────────╮◀─Trig // ││ TRANSFER │ // │╰────────────╯─▶Sync // │╭────────────╮◀─Trig // ││ TRANSFER │ // │╰────────────╯─▶Sync // │ // ▼
// For TILE, DIM1 and DIM2, there may be multiple Trig/Sync pairs within a single // SequenceDataFlowTransfer. For example: // Sequence order // │╭────────────╮◀─Trig/FlushAndTrig // ││ TILE │─▶Sync (first tile is transferred) // ││ │◀─Trig // ││ │─▶Sync (second tile is transferred) // ││ │◀─Trig // │╰────────────╯─▶Sync (first transfer is complete) // │╭────────────╮◀─Trig // ││ TRANSFER │ // │╰────────────╯─▶Sync // │╭────────────╮◀─Trig // ││ TRANSFER │ // │╰────────────╯─▶Sync // ▼
// If a block of CONTINUOUS SequenceDataFlowTransfers are placed after non-CONTINUOUS transfers, // a call to cupvaSQDFTrig() is required at the start of this block, and cupvaSQDFSync() is // required at the end: // Sequence order // │╭────────────╮◀─Trig/FlushAndTrig // ││ CONTINUOUS │ // │╰────────────╯─▶Sync // │╭────────────╮◀─Trig // ││ TRANSFER │ // │╰────────────╯─▶Sync // │╭────────────╮◀─Trig // ││ CONTINUOUS │ // │╰────────────╯ // │╭────────────╮ // ││ CONTINUOUS │ // │╰────────────╯─▶Sync // ▼
Maturity: GA
Values:
-
enumerator TILE#
Trigger is required at the start of each tile, Sync is required to check that a tile has completed.
-
enumerator DIM1#
Trigger is required to start a batch of niter1 tiles, Sync is required to check that the batch has completed (see srcDim1/dstDim1).
-
enumerator DIM2#
Trigger is required to start a batch of niter2 tiles, Sync is required to check that the batch has completed (see srcDim2/dstDim2).
-
enumerator TRANSFER#
Trigger is required at the start of the transfer, Sync is required to check that the transfer has completed.
-
enumerator CONTINUOUS#
Trigger is required at the start of a block of CONTINUOUS transfers, Sync is used to check that the block has completed.