Replies: 2 comments 5 replies
-
can anyone help me? @carzh |
Beta Was this translation helpful? Give feedback.
0 replies
-
You may notice that the inputs and outputs are in CPU:
That means each inference need copy inputs from CPU to GPU, and outputs from GPU to CPU. So, it is expected that there are CPU activity. If you want to verify whether TensorRT is used, you can enable profiling: https://onnxruntime.ai/docs/performance/tune-performance/profiling-tools.html#in-code-performance-profiling, and use NSight System |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
i wrote the below code and except that gpu goes up when i run it. but the only thing that happens is raising up the cpu.
by the way the output result is correct.
where is the problem?
#include
#include
#include <onnxruntime_cxx_api.h>
#include
#include
using namespace std;
int main()
{
constexpr int frameChannels = 1 * 184;
constexpr int frameHeight = 128;
constexpr int frameWidth = 128;
const std::string engineCachePath = "C:/tmp/";
const wchar_t* modelPath = L"metal.onnx";
}
Beta Was this translation helpful? Give feedback.
All reactions