Helper: make_divisible(v, divisor) — rounds v up to nearest multiple of divisor
| 2064 | |
| 2065 | // Helper: make_divisible(v, divisor) — rounds v up to nearest multiple of divisor |
| 2066 | static int edgetam_make_divisible(int v, int divisor) { |
| 2067 | int new_v = std::max(divisor, (v + divisor / 2) / divisor * divisor); |
| 2068 | // Make sure round-down doesn't go below 90% of v |
| 2069 | if (new_v < (int)(0.9f * v)) new_v += divisor; |
| 2070 | return new_v; |
| 2071 | } |
| 2072 | |
| 2073 | static void edgetam_register_tensors(sam3_model& model) { |
| 2074 | const auto& hp = model.hparams; |
no outgoing calls
no test coverage detected