| 7305 | } |
| 7306 | |
| 7307 | void ForesightSwap::predict(ExpertSource* src, int64_t layer, int32_t expert) { |
| 7308 | if (layer < 0 || layer >= n_layers || expert < 0 || expert >= n_expert) return; |
| 7309 | std::lock_guard<std::mutex> smu_lk(smu_); |
| 7310 | request_locked(src, layer, expert, true); |
| 7311 | } |
| 7312 | |
| 7313 | void ForesightSwap::request_locked(ExpertSource* src, int64_t layer, int32_t expert, bool predicted_copy) { |
| 7314 | if (failed.load(std::memory_order_relaxed)) return; |
no outgoing calls