nx
nx copied to clipboard
Upgrade NIF EXLA
Hello
I was trying to upgrade NX & EXLA through a hot upgrade process, however, the NIF is not supporting upgrade capability
ERL_NIF_INIT(Elixir.EXLA.NIF, exla_funcs, &load, NULL, NULL, NULL);
While TorchX supports it,
ERL_NIF_INIT(Elixir.Torchx.NIF, nif_functions, load, NULL, upgrade, NULL)
// ...
int upgrade(ErlNifEnv *env, void **priv_data, void **old_priv_data, ERL_NIF_TERM load_info) {
// Silence "unused var" warnings.
(void)(env);
(void)(priv_data);
(void)(old_priv_data);
(void)(load_info);
return 0;
}
Is there any reason for this choice ? Because in order to support hot upgrades of NX & Backend, then I have to rely on TorchX
Please send a PR adding a similar callback. Thank you.