MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / WithFp16

Method WithFp16

paddle/fluid/inference/tensorrt/engine.h:268–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266 void Deserialize(const std::string& engine_serialized_data);
267
268 bool WithFp16() {
269 bool enable_fp16 = (precision() == phi::DataType::FLOAT16);
270 bool support_fp16 = infer_builder_->platformHasFastFp16();
271 // below is consistent with setFlag in engine.cc
272 bool fall_back_fp16 = WithInt8() && !use_dla();
273 return (enable_fp16 || fall_back_fp16) && support_fp16;
274 }
275
276 bool WithInt8() {
277 bool enable_int8 = (precision() == phi::DataType::INT8);

Callers 15

operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected