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

10 Ansichten (letzte 30 Tage)
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.

Akzeptierte Antwort

Yongsheng
Yongsheng am 28 Jun. 2022
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 Kommentare
Julien Marechal
Julien Marechal am 1 Jul. 2022
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
Yongsheng
Yongsheng am 1 Jul. 2022
Hi Julien,
Thanks for the confirmation. We will update the doc.
Have a nice day!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by