Options for the network
| 62 | |
| 63 | // Options for the network |
| 64 | struct Options { |
| 65 | // Precision to use for GPU inference. |
| 66 | Precision precision = Precision::FP16; |
| 67 | // If INT8 precision is selected, must provide path to calibration dataset |
| 68 | // directory. |
| 69 | std::string calibrationDataDirectoryPath; |
| 70 | // The batch size to be used when computing calibration data for INT8 |
| 71 | // inference. Should be set to as large a batch number as your GPU will |
| 72 | // support. |
| 73 | int32_t calibrationBatchSize = 128; |
| 74 | // The batch size which should be optimized for. |
| 75 | int32_t optBatchSize = 1; |
| 76 | // Maximum allowable batch size |
| 77 | int32_t maxBatchSize = 16; |
| 78 | // GPU device index |
| 79 | int deviceIndex = 0; |
| 80 | }; |
| 81 | |
| 82 | // Class used for int8 calibration |
| 83 | class Int8EntropyCalibrator2 : public nvinfer1::IInt8EntropyCalibrator2 { |
nothing calls this directly
no outgoing calls
no test coverage detected