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
// Prepare inputs
for (size_t i = 0; i < inputs.size(); ++i) {
const TFTensor& input = inputs[i];
const std::string& input_name = input_names_[i];
if (!context_->setTensorAddress(input_name.c_str(), input.data())) {
return tf::errors::Internal(
carbon::Printf("Failed to `setTensorAddress` for input name [%s]",
input_name.c_str()));
}
nvinfer1::Dims dims;
TensorShapeToDims(input.shape(), &dims);
if (!context_->setInputShape(input_name.c_str(), dims)) {
return tf::errors::Internal(carbon::Printf(
"Failed to `setInputShape` for name [%s]", input_name.c_str()));
}
}
It is this setInputShape API that causes the increase in time consumption. If there are nearly a thousand inputs, the time consumption increases by tens of milliseconds.
The text was updated successfully, but these errors were encountered:
Verified model: Search and recommendation model.
Inference time for TRT8 model:
It is this
setInputShape
API that causes the increase in time consumption. If there are nearly a thousand inputs, the time consumption increases by tens of milliseconds.The text was updated successfully, but these errors were encountered: