Stream Data Types - 2023.2 English

AI Engine Kernel and Graph Programming Guide (UG1079)

Document ID
Release Date
2023.2 English
Table 1. Supported Stream Data Types
Input Stream Types Output Stream Types
input_stream<int8> output_stream<int8>
input_stream<int16> output_stream<int16>
input_stream<int32> output_stream<int32>
input_stream<int64> output_stream<int64>
input_stream<uint8> output_stream<uint8>
input_stream<uint16> output_stream<uint16>
input_stream<uint32> output_stream<uint32>
input_stream<uint64> output_stream<uint64>
input_stream<cint16> output_stream<cint16>
input_stream<cint32> output_stream<cint32>
input_stream<float> output_stream<float>
input_stream<cfloat> output_stream<cfloat>
Table 2. Supported Cascade Accumulator Data Types
Input Cascade Types Output Cascade Types
input_cascade<acc16> output_cascade<acc16>
input_cascade<cacc16> output_cascade<cacc16>
input_cascade<acc32> output_cascade<acc32>
input_cascade<cacc32> output_cascade<cacc32>
input_cascade<acc48> output_cascade<acc48>
input_cascade<cacc48> output_cascade<cacc48>
input_cascade<acc64> output_cascade<acc64>
input_cascade<cacc64> output_cascade<cacc64>
input_cascade<acc80> output_cascade<acc80>
input_cascade<cacc80> output_cascade<cacc80>
input_cascade<accfloat> output_cascade<accfloat>
input_cascade<caccfloat> output_cascade<caccfloat>
input_cascade<int8> output_cascade<int8>
input_cascade<int16> output_cascade<int16>
input_cascade<int32> output_cascade<int32>
input_cascade<int64> output_cascade<int64>
input_cascade<cint16> output_cascade<cint16>
input_cascade<cint32> output_cascade<cint32>
input_cascade<cfloat> output_cascade<cfloat>
input_cascade<float> output_cascade<float>

Each of the data types in the table can be read or written from the AI Engine as either scalars or in vector groups. However, there are certain restrictions on valid groupings based on the bus data width supported on the AI Engine to programmable logic interface ports or through the stream-switch network. The valid combinations for AI Engine kernels are vector bundles totaling up to 32-bits or 128-bits. The accumulator data types are only used to specify cascade-stream connections between adjacent AI Engines. Its valid groupings are based on the 384-bit wide cascade channel between two processors.

Note: To use these data types, it is necessary to use #include <adf.h> in the kernel source file.