How do I deploy a generation (or dll) code generated by GPU Coder to a target computer?

8 views (last 30 days)
I tested the process in visual studio 2015 with reference to the official document theme "Code Generation for Deep Learning Networks by Using cuDNN" in conjunction with "Use a Dynamic Library in a Microsoft Visual Studio Project". The whole process is no problem, and then successfully generated. The dll and the necessary files successfully run through!
The problem is: 1. Deep learning models such as googlenet generate too many weights and offset files. If deployed on the target computer, copy the model files (plus generated dlls) to the target computer. My suggestion is whether to put these model files into a folder or just generate a large model?
2. Using VS2015 to successfully add the library file generated by GPU Coder to my application. If it is deployed on the target computer, the environment is another win10. There is no pre-installed other general software. Except for the model file generated above, generated. In addition to the dll file, what files need to be copied to the target computer? (I know that the corresponding opencv library file, cudnn library file must also be copied), in addition, you need to install the corresponding CUDA on the target computer? I copied the necessary library files to the target computer, but when I ran the application and found the crash, the crash point was on the googlenet forward!
3, the deployed computer's gpu computing power is only 3.0, but I can only specify a minimum computing power of 3.2 in the matlab GPU coder, you can also customize the specified GPU computing power cfg.GpuConfig.CustomComputeCapability = '-arch=compute_30'; The result is still not accelerated on the target computer, the speed is very slow, how to solve it (I know one way can be solved by generating the MKL-DNN library)?
I have asked a lot of questions, sincerely hope to get answers or suggestions, thank you!
我参照官方文档主题“Code Generation for Deep Learning Networks by Using cuDNN”结合“Use a Dynamic Library in a Microsoft Visual Studio Project”在visual studio 2015测试了下这个过程,整个过程是没有问题的,然后成功把生成的dll和必要的文件中成功跑通!
问题是:1、深度学习模型比如googlenet生成的权重和偏置文件太多,如果在目标计算机上部署,都要把各个模型文件(外加生成的dll)拷贝到目标计算机上,建议能否把这些模型文件放到一个文件夹中或者直接生成一个大的模型?
2、用VS2015把GPU Coder生成的库文件成功加入到了我的应用程序,如果在目标计算机上部署,环境是另外一台win10,没有预装其他一般软件,请问除了上面生成的模型文件、生成的dll文件外,还需要拷贝什么文件到目标计算机?(我知道对应的opencv库文件、cudnn库文件也必须要拷贝),另外需要在目标计算机上也要安装对应的CUDA吗?我把必要的库文件都拷贝到目标计算机上了,但是当我运行应用程序后发现崩溃了,崩溃点在googlenet的forward上!
3、部署的计算机的gpu计算能力只有3.0,但是我在matlab GPU coder只能指定最小的计算能力为3.2,还可以自定义指定GPU 计算能力cfg.GpuConfig.CustomComputeCapability = '-arch=compute_30';但是结果是在目标计算机上仍然不能加速,运行速度非常慢,请问如何解决(我知道一种方式是可以通过生成MKL-DNN库来解决)?
我问的问题比较多,真诚能够希望得到解答或建议,谢谢!
os:win10
target computer:win10
matlab version: matlab2019b
cuda version: cuda10.1
cudnn version:v7.6.4

Answers (0)

Categories

Find more on Get Started with GPU Coder in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!