Xilinx FPGA AI Models Expert Assistance

Job ID: 39015839

Budget: $250 – $750 USD

Request for Assistance from an Experienced Freelancer with Running AI Models on Xilinx FPGA Using TVM
We are looking for an expert with experience in running AI models on Xilinx-based FPGAs using TVM. We need someone who can provide tips for resolving issues through video tutorials or documentation. If necessary, we are open to remote support or virtual meetings to address the problems.
Our goal is to run AI models trained in TensorFlow on a Xilinx Ultra96v2 FPGA board. Following the instructions provided in the linked guide, we are executing AI models compiled with TVM using the Vitis AI DPU.
The tools and versions currently being used are as follows:
• PYNQ: Version 3.0.1
• Vitis AI: Version 2.5
• TVM: Version 0.19
Below are the issues we need help resolving:
1. TensorFlow Model Conversion Error
Following the example (https://tvm.apache.org/docs/how_to/compile_models/from_tensorflow.html), when converting a TensorFlow AI model into a relay model using the tvm.relay.frontend.from_tensorflow function, we encounter the error:
"TypeError: dense() got an unexpected keyword argument 'grad_a'."
We believe this issue arises because of differences in TensorFlow model arguments introduced with the transition from TensorFlow 1 to TensorFlow 2 (https://github.com/tensorflow/tensorflow/issues/24573). Additionally, it seems that the TVM version being used does not support TensorFlow 2 (https://discuss.tvm.apache.org/t/how-to-import-native-tensorflow2-trained-model-into-tvm-relay/8847/3). Could you confirm the TensorFlow version compatible with the TVM version we are using?

2. Build Error on TVM Runtime for Ultra96v2
Following the steps in the linked guide (https://tvm.apache.org/docs/how_to/deploy/vitis_ai.html), we built TVM on the Ultra96v2. However, when importing the library with import tvm.relay as relay, the error occurs:
"AttributeError: module 'tvm.relay._ffi_api' has no attribute 'Any'."
We suspect this is due to a dependency issue, where a specific library might be missing during runtime installation (https://discuss.tvm.apache.org/t/attributeerror-when-import-tvm-relay/3305/5). If this is the case, could you provide additional setup instructions or recommend compatible versions? If this assumption is incorrect, please advise on how to identify the root cause and resolve this issue.

3. DPU Virtual Implementation and Simulation
In previous projects using VTA, we relied on the VTA simulator (https://tvm.apache.org/docs/v0.8.0/topic/vta/install.html#vta-simulator-installation) for functional verification by simulating the NPU. Does Vitis AI's DPU provide a similar simulation capability, or are there examples for this?
According to this post (https://adaptivesupport.amd.com/s/question/0D54U00006nUFGYSA4/is-running-vitis-ai-in-simulation-mode-possible?language=en_US), such a simulator is not available. Would it be possible to simulate the Vitis AI DPU using TVM’s Target.virtualmachine function? If so, could you provide guidance or examples?