Struct NativeConfig

Inheritance Relationships

Base Type

Struct Documentation

struct paddle::NativeConfig : public paddle::PaddlePredictor::Config

configuration manager for NativePredictor.

AnalysisConfig manages configurations of NativePredictor. During inference procedure, there are many parameters(model/params path, place of inference, etc.)

Public Functions

void SetCpuMathLibraryNumThreads(int cpu_math_library_num_threads)

Set and get the number of cpu math library threads.

int cpu_math_library_num_threads() const

Public Members

bool use_gpu = {false}

GPU related fields.

int device = {0}
float fraction_of_gpu_memory{-1.f}

Change to a float in (0,1] if needed.

std::string prog_file
std::string param_file

Specify the exact path of program and parameter files.

bool specify_input_name = {false}

Specify the variable’s name of each input if input tensors don’t follow the feeds and fetches of the phase save_inference_model.

Protected Attributes

int cpu_math_library_num_threads_ = {1}

number of cpu math library (such as MKL, OpenBlas) threads for each instance.