MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / Step_4

Method Step_4

csrc/lion/cpu_lion_impl.cpp:68–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67template <typename ds_params_precision_t, typename ds_state_precision_t>
68void 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
84int create_lion_optimizer(int optimizer_id,
85 float alpha,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected