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

10 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by