| 131 | } |
| 132 | |
| 133 | static bool checkSystem() { |
| 134 | #ifdef _WIN32 |
| 135 | // On Windows, skip the system check as this tool is primarily for Linux |
| 136 | // but we allow it to compile on Windows for development purposes |
| 137 | MNN_PRINT("Warning: This tool is designed for x86_64 Linux systems. Running on Windows may have limitations.\n"); |
| 138 | return true; |
| 139 | #else |
| 140 | struct utsname buf; |
| 141 | if (uname(&buf) != 0) { |
| 142 | MNN_ERROR("uname error\n"); |
| 143 | return false; |
| 144 | } |
| 145 | if (std::string(buf.sysname) == "Linux" && std::string(buf.machine) == "x86_64") { |
| 146 | return true; |
| 147 | } |
| 148 | MNN_ERROR("This program must be run on a x86_64 Linux system. Current system: %s %s\n", buf.sysname, buf.machine); |
| 149 | return false; |
| 150 | #endif |
| 151 | } |
| 152 | |
| 153 | int main(int argc, const char* argv[]) { |
| 154 | if (argc < 6) { |