|
|
|
@ -90,14 +90,12 @@ class TensorRTSubgraphPredictor : public NativePaddlePredictor {
|
|
|
|
|
// Analyze inference_program
|
|
|
|
|
Argument argument;
|
|
|
|
|
|
|
|
|
|
int* minimum_subgraph_size = new int(config_.minimum_subgraph_size);
|
|
|
|
|
int* max_batch_size = new int(config_.max_batch_size);
|
|
|
|
|
int* workspace_size = new int(config_.workspace_size);
|
|
|
|
|
std::string* precision_mode = new std::string(config_.precision_mode);
|
|
|
|
|
argument.Set<int>("minimum_subgraph_size", minimum_subgraph_size);
|
|
|
|
|
argument.Set<int>("max_batch_size", max_batch_size);
|
|
|
|
|
argument.Set<int>("workspace_size", workspace_size);
|
|
|
|
|
argument.Set<std::string>("precision_mode", precision_mode);
|
|
|
|
|
argument.Set<int>("minimum_subgraph_size",
|
|
|
|
|
new int(config_.minimum_subgraph_size));
|
|
|
|
|
argument.Set<int>("max_batch_size", new int(config_.max_batch_size));
|
|
|
|
|
argument.Set<int>("workspace_size", new int(config_.workspace_size));
|
|
|
|
|
argument.Set<std::string>("precision_mode",
|
|
|
|
|
new std::string(config_.precision_mode));
|
|
|
|
|
|
|
|
|
|
if (!config_.model_dir.empty()) {
|
|
|
|
|
argument.fluid_model_dir.reset(new std::string(config_.model_dir));
|
|
|
|
|