You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for (int i = 0; i < engine->getNbBindings(); i++) { // getNbBindings() ile binding sayısı alınıyor
if (engine->bindingIsInput(i)) { // bindingIsInput ile input olup olmadığı kontrol ediliyor
inputIndex = i;
std::cout << "Found input binding at index " << i << std::endl;
} else {
outputIndex = i;
std::cout << "Found output binding at index " << i << std::endl;
}
}
if (inputIndex == -1 || outputIndex == -1) {
std::cerr << "Failed to find input or output bindings!" << std::endl;
return -1;
}
// Get the dimensions of input/output
nvinfer1::Dims inputDims = engine->getBindingDimensions(inputIndex);
nvinfer1::Dims outputDims = engine->getBindingDimensions(outputIndex);
And gave me an vs code error : "class "nvinfer1::ICudaEngine" has no member "getNbBindings"C/C++(135)"
Terminal Output:
ahmet@ahmet-Precision-3660:~/workspace-example/tensorrt$ g++ 02-running-engine-file.cpp -o engine-result -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lnvinfer -lcudart -std=c++11
02-running-engine-file.cpp: In function ‘int main()’:
02-running-engine-file.cpp:60:33: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getNbBindings’
60 | for (int i = 0; i < engine->getNbBindings(); i++) { // getNbBindings() ile binding sayısı alınıyor
| ^~~~~~~~~~~~~
02-running-engine-file.cpp:61:21: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘bindingIsInput’
61 | if (engine->bindingIsInput(i)) { // bindingIsInput ile input olup olmadığı kontrol ediliyor
| ^~~~~~~~~~~~~~
02-running-engine-file.cpp:76:40: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getBindingDimensions’
76 | nvinfer1::Dims inputDims = engine->getBindingDimensions(inputIndex);
| ^~~~~~~~~~~~~~~~~~~~
02-running-engine-file.cpp:77:41: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getBindingDimensions’
77 | nvinfer1::Dims outputDims = engine->getBindingDimensions(outputIndex);
| ^~~~~~~~~~~~~~~~~~~~
How to solve this :(
The text was updated successfully, but these errors were encountered:
Environment
TensorRT Version: 10.4
NVIDIA GPU: A2000
NVIDIA Driver Version: 560
CUDA Version: Cuda 12.6
CUDNN Version: 9.4
Operating System: Ubuntu 22.04
Python Version (if applicable):
Tensorflow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if so, version):
This is my Code ;
And gave me an vs code error : "class "nvinfer1::ICudaEngine" has no member "getNbBindings"C/C++(135)"
Terminal Output:
ahmet@ahmet-Precision-3660:~/workspace-example/tensorrt$ g++ 02-running-engine-file.cpp -o engine-result -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lnvinfer -lcudart -std=c++11
02-running-engine-file.cpp: In function ‘int main()’:
02-running-engine-file.cpp:60:33: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getNbBindings’
60 | for (int i = 0; i < engine->getNbBindings(); i++) { // getNbBindings() ile binding sayısı alınıyor
| ^~~~~~~~~~~~~
02-running-engine-file.cpp:61:21: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘bindingIsInput’
61 | if (engine->bindingIsInput(i)) { // bindingIsInput ile input olup olmadığı kontrol ediliyor
| ^~~~~~~~~~~~~~
02-running-engine-file.cpp:76:40: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getBindingDimensions’
76 | nvinfer1::Dims inputDims = engine->getBindingDimensions(inputIndex);
| ^~~~~~~~~~~~~~~~~~~~
02-running-engine-file.cpp:77:41: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getBindingDimensions’
77 | nvinfer1::Dims outputDims = engine->getBindingDimensions(outputIndex);
| ^~~~~~~~~~~~~~~~~~~~
How to solve this :(
The text was updated successfully, but these errors were encountered: