Hello,
I'm working on a custom computer vision model that uses Conv2D layers for feature extraction and a Dense (fully connected) layer for classification.
Here's what I've done so far:
Quantized the model to INT8
Converted it using the Neutron Converter for i.MX95 NPU
After conversion, I noticed that:
Only Conv2D layers are offloaded to the NPU
The fully connected layer remains on the CPU
A SLICE operator appears in the Neutron graph
I reviewed the i.MX95 User Manual, which lists the following constraints for fully connected layers:
Input tensor must be INT8
Weight tensor must be INT8 and constant
Bias tensor must be INT32 and constant
Output tensor must be INT8
Input and output channels must be multiples of NUM_MACS
(Otherwise, the converter adds PAD or SLICE operators)
Since I see a SLICE operator in the graph, it seems the output channel alignment is handled, but the fully connected layer still isn't offloaded to the NPU.
My Questions:
Why is the fully connected layer not being converted to NPU execution?
Is the SLICE operator related to this issue?
Am I missing any other constraints for fully connected layers?
I’ve attached the model file and screenshots of the Neutron graph for reference.
Thanks in advance for your help!
Hello,
What BSP and tools version are you using? are you part of Beta program?
Regards
Hi,
BSP Version:
ID=fsl-imx-xwayland
NAME="NXP i.MX Release Distro"
VERSION="6.6-scarthgap (scarthgap)"
VERSION_ID=6.6-scarthgap
VERSION_CODENAME="scarthgap"
PRETTY_NAME="NXP i.MX Release Distro 6.6-scarthgap (scarthgap)"
CPE_NAME="cpe:/o:openembedded:fsl-imx-xwayland:6.6-scarthgap"
eIQ :
eIQ Toolkit version - 1.14.0
eIQ Portal - 2.14.0
Regards,
Varshil
Hi,
You should move to the latest BSP.
Regards
Hi team,
Thank you for your earlier suggestion to upgrade to the Latest BSP.
However, due to some software constraints, I am unable to migrate immediately.
Could you please help clarify:
1. Which key ML/NPU-related improvements (especially for TFLite delegate or Neutron delegate) are added in the latest BSP that are not supported in 6.6?
2. Specifically, is the support for FullyConnected layer mapping to the Neutron NPU added or fixed only in the latest BSP?
3. Are there updated versions of TFLite / NNRT / NPU delegate tools that are necessary for my use case (Vision AI model with Dense layers)?
I’m primarily working on deploying custom CNN models using TFLite, and want to make sure whether it’s absolutely essential to upgrade, or if there is a workaround or backport possibility.
Thank you in advance for your insights.
Best regards,
Varshil