| 188 | } |
| 189 | |
| 190 | static bool isLinearSample(const std::vector<int8_t>& sample, int bit) { |
| 191 | const int offset = 1 << (bit - 1); |
| 192 | const int size = 1 << bit; |
| 193 | if (sample.size() != size) { |
| 194 | return false; |
| 195 | } |
| 196 | for (int i = 0; i < sample.size(); i++) { |
| 197 | if (static_cast<int>(sample[i]) != i - offset) { |
| 198 | return false; |
| 199 | } |
| 200 | } |
| 201 | return true; |
| 202 | } |
| 203 | |
| 204 | static void ReadQuanInfo(BaseLoader* s, size_t* len, ConvolutionCommon::Int8Common* result, bool shapeInt32) { |
| 205 | *len = 1; |