| 208 | using dflash::common::activation_pair_init; |
| 209 | using dflash::common::find_layer_split_shard; |
| 210 | |
| 211 | static bool parse_int_list(const char * text, std::vector<int> & out) { |
| 212 | out.clear(); |
| 213 | if (!text || !*text) return false; |
| 214 | const char * p = text; |
| 215 | while (*p) { |
| 216 | char * end = nullptr; |
| 217 | long v = std::strtol(p, &end, 10); |
| 218 | if (end == p || v < 0 || v > INT32_MAX) return false; |
| 219 | out.push_back((int)v); |
| 220 | if (*end == '\0') break; |
| 221 | if (*end != ',') return false; |
| 222 | p = end + 1; |
| 223 | } |
| 224 | return !out.empty(); |
| 225 | } |
| 226 | |
| 227 | static bool parse_float_list(const char * text, std::vector<double> & out) { |