cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
asobeih
Explorer
Explorer
611 Views
Registered: ‎02-13-2016

vai_c_tensorflow does not generate meta.json

Hi,

When I compile the deployment model that is generated from the quantization step, I would have the following files in the output directory specified:

  • dpu_modelName_0.elf
  • dpu_modelName_2.elf
  • modelName_kernel_graph.gc
  • modelName_kernel.info

Based on my readings of UG1414 - Vitis AI User Guide , there should be another file to be generated out of the compilation phase that is called "meta.json. However, I tried to run the compilation command with different arguments, but this did not solve the problem. Below is the command I used to compile my model.

 vai_c_tensorflow --frozen_pb freeze/qoutput/deploy_model.pb --arch /opt/vitis_ai/compiler/arch/dpuv2/ZCU104/ZCU104.json --output_dir zcu104_itip/out_new/ --net_name nn -e "{'save_kernel' : 'kernel.txt', 'dump' : 'all'}"

So, how to solve this problem?

Thanks.

0 Kudos
5 Replies
asobeih
Explorer
Explorer
559 Views
Registered: ‎02-13-2016

Hello,

I am still looking for any help with my issue.

Thanks.

0 Kudos
jasonwu
Moderator
Moderator
537 Views
Registered: ‎03-27-2013

Hi @asobeih ,

 

I just updated my custom model from training to deployment tutorial on VAI 1.2 recently and I belive that I have attached necessary custom files inside the github repository.

https://github.com/gewuek/flower_classification_vai_tf_numpy_array

Hope this can help and please feel free to let me know if any information is missing.

Best Regards,
Jason
-----------------------------------------------------------------------------------------------
Please mark the Answer as "Accept as solution" if the information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
-----------------------------------------------------------------------------------------------
0 Kudos
asobeih
Explorer
Explorer
510 Views
Registered: ‎02-13-2016

Hi @jasonwu ,

Thanks a lot for your response.

I am just not sure about how considering this repo should help me with my problem.

I just would like to clarify the following:

  • I am considering Python API, not C/C++. I am not sure if this makes any difference.
  • I checked your Vitis AI compilation script. I am using the same exact commands and parameters. However, I was expecting to find a meta.json file generated, yet, this did not happen. Is this normal?
  • I significantly rely on the following resources:
  • In these two resources; it is mentioned that this meta.json file should be generated, which does not happen in my case.

Another question that I have regarding the compilation step itself. My model has two layers that are not supported by the DPU; Softmax and Global Average Pooling. The compiler generates a message that I need to implement these two layers manually and execute them on the CPU. The compiler generates two .ELF files:

  • dpu_modelName_0.elf
  • dpu_modelName_2.elf

Which one is used to run my model on the DPU?

0 Kudos
asobeih
Explorer
Explorer
493 Views
Registered: ‎02-13-2016

Hi @jasonwu ,

In addition to my previous question, I still have one more question.

In the API code, there is a defined variable called cnt, which is a parameter of the function that runs the .elf file. In the comments, the cnt is defined that it is the number of the threads. So, my question is how to define the value of cnt? I just do not know how to decide.

In the given examples by Vitis AI, there are two examples; Resnet50 and the assigned cnt value is 360, while it is 1200 in Inception V1.

How to decide its value?

 

Thanks.

0 Kudos
jasonwu
Moderator
Moderator
455 Views
Registered: ‎03-27-2013

Hi @asobeih ,

 

I have answered on my personal github repo on an opening issue about where to find the json file for ZCU102/104 official released image.

https://github.com/gewuek/flower_classification_vai_tf_dataset/issues/1

You can find the json files inside the docker image.

And about how to set json file for custom platform please refer to this tutorial:

https://github.com/gewuek/vitis_ai_custom_platform_v1.2_tmp

 

Best Regards,
Jason
-----------------------------------------------------------------------------------------------
Please mark the Answer as "Accept as solution" if the information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
-----------------------------------------------------------------------------------------------
0 Kudos