7.4.3.2. Fixing Unsupported Layers Assigned To CPU
If you encountered the warning message from the FPGA AI Suite compiler saying that your ML graph is split into too many subgraphs, or you suspect that many graph layers are assigned to the CPU and are causing low performance, check if the graph contains unsupported layers.
Graph layers that are unsupported by the FPGA cause the compiler to split the computation graph to heterogeneous subgraphs. Each heterogeneous subgraph has its corresponding DOT file. CPU subgraphs, when introduced unnecessarily, are bad for performance because moving data from FPGA to CPU, and then the reverse, costs wasted cycles. In general, unless the CPU execution of the subgraphs is intentional or necessary (for example, the output layers of YOLO are handled by CPU), eliminate as many of them as possible.
Unsupported layers that are assigned to CPU are usually caused by the following reasons:
- Your ML graph uses an unsupported layer, or the hyperparameter of a layer is not within the supported range by the FPGA AI Suite. In this case, consider searching for a supported alternative, or workaround by replacing the unsupported layer with one or a combination of other layers that achieves the same outcome as the unsupported layer. To learn about the supported layers and their supported ranges, refer to The FPGA AI Suite IP Overlay Architecture.
- If the layer is a supported layer, and the hyperparameters are within the supported range, but the compiler still creates CPU subgraph, then you might be using an architecture that does not enable the essential computation modules.
Use the Model Analyzer GUI to view the unsupported layers by opening an unsupported layer DOT file in the compiler report files. Click on the nodes to investigate the assignment reasons in the Details Pane and fix the unsupported layers accordingly.