| 66 | |
| 67 | template <typename ds_params_precision_t, typename ds_state_precision_t> |
| 68 | void Lion_Optimizer::Step_4(ds_params_precision_t* _params, |
| 69 | ds_params_precision_t* grads, |
| 70 | ds_state_precision_t* _exp_avg, |
| 71 | size_t _param_size) |
| 72 | { |
| 73 | size_t rounded_size = 0; |
| 74 | #if defined(__AVX512__) or defined(__AVX256__) |
| 75 | Step_AVX<4>(&rounded_size, _params, grads, _exp_avg, _param_size); |
| 76 | #endif |
| 77 | if (_param_size > rounded_size) |
| 78 | Step_1((_params + rounded_size), |
| 79 | (grads + rounded_size), |
| 80 | (_exp_avg + rounded_size), |
| 81 | (_param_size - rounded_size)); |
| 82 | } |
| 83 | |
| 84 | int create_lion_optimizer(int optimizer_id, |
| 85 | float alpha, |
nothing calls this directly
no outgoing calls
no test coverage detected