| 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); |
no outgoing calls
no test coverage detected