| 76 | } |
| 77 | |
| 78 | static bool compareVar(MNN::Express::VARP x, MNN::Express::VARP y, double tolerance) { |
| 79 | auto info = y->getInfo(); |
| 80 | auto dtype = info->type; |
| 81 | auto size = info->size; |
| 82 | if (dtype == halide_type_of<int32_t>()) { |
| 83 | return compareImpl<int32_t>(x, y, size, tolerance); |
| 84 | } |
| 85 | if (dtype == halide_type_of<uint8_t>()) { |
| 86 | return compareImpl<uint8_t>(x, y, size, tolerance); |
| 87 | } |
| 88 | return compareImpl<float>(x, y, size, tolerance); |
| 89 | } |
| 90 | |
| 91 | using namespace MNN::Express; |
| 92 | int main(int argc, const char* argv[]) { |