question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I use c++ SDK in my server and use the command object_detection.exe cuda E:\\PycharmProjects\\mmdeploy_out\\mmdet\\faster_rcnn_r50_trt E:\\PycharmProjects\\mmdetection-master\\demo\\1.jpg could successfully run ,but when I download the related code and compile success,I use same command ,it shows [2022-08-10 13:12:34.783] [mmdeploy] [error] [model.cpp:44] no ModelImpl can read model D:/pythonProject/mmdeploy_out/mmdet/faster_rcnn_r50_trt [2022-08-10 13:12:34.784] [mmdeploy] [error] [model.cpp:15] load model failed. Its file path is 'D:/pythonProject/mmdeploy_out/mmdet/faster_rcnn_r50_trt' [2022-08-10 13:12:34.786] [mmdeploy] [error] [model.cpp:20] failed to create model: not supported (2) failed to create detector, code: 6 could you help me? Should I disposition tensorRT environment in my computer with visual stusdio? 我在服务器上已经能够通过c++推理运行相关代码了,但是当我把trt模型文件下载到自己电脑,并且也下载其他相关代码而且编译成功没有报错了,在运行exe文件时,出现了上述报错。会不会是我在vs中没有配置tensorRT的问题呢?但是我在编译过程中并没有任何报错

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
irexyccommented, Aug 11, 2022

你可以研究一下mmdeploy的cmake工程,在编译example的时候,mmdeploy_load_dynamic其实是构建了一个loader,然后在exe中静态链接了一个函数,该函数使用LoadLibraryA去加载一些module的dll。

You can study the cmake project of mmdeploy. When compiling the example, mmdeploy_load_dynamic statically link a loader to the exe. The loader uses LoadLibraryA to load some module dlls.

https://github.com/open-mmlab/mmdeploy/blob/master/demo/csrc/CMakeLists.txt#L23 https://github.com/open-mmlab/mmdeploy/blob/master/cmake/MMDeploy.cmake#L161-L166 https://github.com/open-mmlab/mmdeploy/blob/master/cmake/loader.cpp.in

如果编译example的时候想脱离cmake的工程的话,可以在编译mmdeploy的时候,加上-D MMDEPLOY_BUILD_SDK_MONOLITHIC=ON选项,然后会生成一个mmdeploy.dll的动态库,在生成exe的时候只链接这个dll就可以(之前的dll变成了mmdeploy.dll的依赖,还是需要移动到项目文件夹或者添加PATH)

If you want to build project without cmake when compiling the example, you can add the -D MMDEPLOY_BUILD_SDK_MONOLITHIC=ON option when compiling mmdeploy. It will generate dynamic library called mmdeploy.dll. When compile example, you only need to link that lib(the previous dll has become a dependency of mmdeploy.dll, and it still needs to be moved to the project folder or added to the PATH)

0reactions
irexyccommented, Aug 12, 2022

可以参考这个issue的说明 https://github.com/open-mmlab/mmdeploy/issues/685

Read more comments on GitHub >

github_iconTop Results From Across the Web

Generate logs for troubleshooting (C SDK)
To help troubleshoot an issue, we recommend generating logs at their highest level: Set the C SDK log to verbose level and the...
Read more >
azure-iot-sdk-c: Problem with device provisioning
azure-iot-sdk-c: Problem with device provisioning. Hi,. Has something changed recently w.r.t DPS? I have generated the certificates as ...
Read more >
azure-iot-sdk-c linking fails during make #22777 - GitHub
This 'undefined reference' issue looks like 'Linux for dummies'! When building apps or tools we need to take into account all the dependencies....
Read more >
Troubleshooting build issues - AWS SDK for C++
To resolve this error, tell CMake where to find the installed SDK (e.g. the folder that was generated as a result of the...
Read more >
MSBUILD throws error: The SDK 'Microsoft.NET.Sdk' specified ...
To fix the problem, I manually set the MSBuildSDKsPath environment variable to point to 2.0.0's SDK path, which, for me with x64, this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found