GPU Coder library deployment

조회 수: 3 (최근 30일)
Markus Walser
Markus Walser 2019년 10월 31일
댓글: Markus Walser 2019년 11월 5일
Hi
I successfully generated a static library of a resnet and linked it into my application. The resulted library performs nicely within my application.
Next I tried to link the generated library as a different user into the users application which also worked fine. But as soon as the user runs the application, the linked-in GPU Coder library is trying to load some binary weight files from the build folder which is no longer accessible. Then the application terminates with a 'std::runtime_error' exception pointing to the binary file not available.
How can the binary file be linked into the static library in order to get a more portable library output of the GPU Coder?

채택된 답변

Ganesh Regoti
Ganesh Regoti 2019년 11월 5일
Hi,
As per my understanding, the static library is deployed in user application but is unable to run as it is unable to access weight files.
Here are certain things which you need to cross-verify:
Whether the weight files are transferred/deployed correctly to user’s application.
Even after that if you get errors then try the following:
  • In DeepLearningNetwork.cu file, paths to .bin files are defined, and it is absolute. If you have changed the location of these files, try to give that particular path either absolute or relative (relative to target library location)
  • After that try to rebuild the executable and library using Makefile (command – make -f [Makefile name] )
  • Now try deploying in the users application.
Hope this helps!
  댓글 수: 1
Markus Walser
Markus Walser 2019년 11월 5일
Thank you very much for your answer.
After digging in the generated code I found out there's the environment variable USER_DL_DATA_PATH which can be used to pass the path of the binary weight files to the application.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with GPU Coder에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by