17 #include "fastdeploy/core/fd_type.h" 22 #include "fastdeploy/runtime/backends/tensorrt/option.h" 52 bool enable_log_info =
false;
54 bool enable_mkldnn =
true;
56 bool enable_trt =
false;
58 bool enable_memory_optimize =
true;
60 bool switch_ir_debug =
false;
68 bool collect_trt_shape =
false;
70 int mkldnn_cache_size = -1;
72 int gpu_mem_init_size = 100;
74 bool enable_fixed_size_opt =
false;
78 trt_disabled_ops_.insert(trt_disabled_ops_.end(), ops.begin(), ops.end());
83 delete_pass_names.push_back(pass_name);
86 void SetIpuConfig(
bool enable_fp16,
int replica_num,
87 float available_memory_proportion,
88 bool enable_half_partial) {
92 available_memory_proportion;
99 bool enable_pinned_memory =
false;
100 void* external_stream_ =
nullptr;
101 Device device = Device::CPU;
103 std::vector<std::string> trt_disabled_ops_{};
104 int cpu_thread_num = 8;
105 std::vector<std::string> delete_pass_names = {};
106 std::string model_file =
"";
107 std::string params_file =
"";
110 bool model_from_memory_ =
false;
void DisableTrtOps(const std::vector< std::string > &ops)
Disable type of operators run on TensorRT.
Definition: option.h:77
void DeletePass(const std::string &pass_name)
Delete pass by name.
Definition: option.h:82
float ipu_available_memory_proportion
the available memory proportion for matmul/conv
Definition: option.h:43
Option object to configure Paddle Inference backend.
Definition: option.h:50
bool ipu_enable_fp16
enable fp16
Definition: option.h:39
bool ipu_enable_pipelining
enable pipelining
Definition: option.h:35
int ipu_micro_batch_size
the batch size in the graph, only work when graph has no batch shape info
Definition: option.h:33
bool ipu_enable_half_partial
enable fp16 partial for matmul, only work with fp16
Definition: option.h:45
int ipu_device_num
IPU device id.
Definition: option.h:31
int ipu_batches_per_step
the number of batches per run in pipelining
Definition: option.h:37
int ipu_replica_num
the number of graph replication
Definition: option.h:41
Option object to configure TensorRT backend.
Definition: option.h:26
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16
Option object to configure GraphCore IPU.
Definition: option.h:29