Generated number of Sync Processor isntructions exceeds the specified SyncInstructionNumber : Error in dnnfpga.ap​is.Workflo​w/compile

10 次查看(过去 30 天)
Hi, while using the compile fonction from the package dlhdl, the function returns me the following error :
"""
Error using dnnfpga.compiler.codegenfpga
The generated number of Sync processor instructions '17523' exceeds the specified SyncInstructionNumber '8192'. To fix the problem, increase the value of SyncInstructionNumber in the dlhdl.ProcessorConfig.
Error in dnnfpga.apis.Workflow/compileNetwork
Error in dnnfpga.apis.Workflow/compile
"""
Problem is that I don't find any function to modify the "SyncInstructionNumber" in my processor config as the error recommand me to do.
Any idea ?
my code is :
hPC_opti = dlhdl.ProcessorConfig();
hPC_opti.ProcessorDataType = 'int8';
hPC_opti.setModuleProperty('conv','InputMemorySize',[127 127 3])
hPC_opti.setModuleProperty('conv','OutputMemorySize',[127 127 1]);
hPC_opti.setModuleProperty()
%hPC_opti2.optimizeConfigurationForNetwork(snet)
%hPC_opti2 = optimizeConfigurationForNetwork(hPC_opti,dlquantObj.NetworkObject)
%hPC_opti.ProcessorDataType
hPC_opti.estimatePerformance(dlquantObj)
hPC_opti.estimateResources
hTarget = dlhdl.Target("Xilinx",'Interface','Jtag')
hdlsetuptoolpath('ToolName','Xilinx Vivado','ToolPath','D:\Xilinx\Vivado\2020.1\bin');
dlhdl.buildProcessor(hPC_opti)
hW = dlhdl.Workflow('network', dlquantObj, 'Bitstream', 'D:\test\dlhdl_prj\dlprocessor.bit' ,'Target',hTarget);
dn = hW.compile
I am working with matlab r2022a.

采纳的回答

Yongsheng
Yongsheng 2022-6-28
Hi Julien,
"SyncInstructionNumber" needs to be larger for network with more Conv Layers or Larger Conv Layers. So this error message is generated when the compiler detects the network is too big to fit in the default SyncInstructionNumber, which is 8192.
SyncInstructionNumber is a hidden property, you can use the following command to change its value, and create new bit-stream:
hPC_opti = dlhdl.ProcessorConfig();
hPC_opti.ProcessorDataType = 'int8';
hPC_opti.setModuleProperty('conv','InputMemorySize',[127 127 3])
hPC_opti.setModuleProperty('conv','OutputMemorySize',[127 127 1]);
% use this command to change SyncInstructionNumber value
hPC_opti.setModuleProperty('conv', 'SyncInstructionNumber', 18000);
dlhdl.buildProcessor(hPC_opti)
And then create target and workflow objects as in your code.
hdlsetuptoolpath('ToolName','Xilinx Vivado','ToolPath','D:\Xilinx\Vivado\2020.1\bin');
hTarget = dlhdl.Target("Xilinx",'Interface','Jtag')
hW = dlhdl.Workflow('network', dlquantObj, 'Bitstream', 'D:\test\dlhdl_prj\dlprocessor.bit' ,'Target',hTarget);
dn = hW.compile
hW.deploy
Please let me know how it works.
Thanks,
Yongsheng
  2 个评论
Julien Marechal
Julien Marechal 2022-7-1
Hi, thanks for your reply !!
Your solution works for me !
But I don't really understand why it is a "secret argument". I have spent a lot of time to solve this and it could have been avoided with the naming of this argument in the doc :(. I really think you should at least reference it.
Have a nice day

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

产品


版本

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by