From 6fff76fffa4851c72b8a79192f653d656651a0d7 Mon Sep 17 00:00:00 2001 From: Paulo Valente <16843419+polvalente@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:20:28 -0300 Subject: [PATCH] chore(exla): upgrade NIFs (#1513) --- exla/c_src/exla/exla.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/exla/c_src/exla/exla.cc b/exla/c_src/exla/exla.cc index 2bf3fadd26..04202405d6 100644 --- a/exla/c_src/exla/exla.cc +++ b/exla/c_src/exla/exla.cc @@ -78,6 +78,16 @@ static int load(ErlNifEnv* env, void** priv, ERL_NIF_TERM load_info) { return 0; } +static 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; +} + // MLIR Functions ERL_NIF_TERM type_parsing_error(ErlNifEnv* env, std::string type_string) { @@ -939,4 +949,4 @@ static ErlNifFunc exla_funcs[] = { {"serialize_executable", 1, serialize_executable}, {"deserialize_executable", 2, deserialize_executable}}; -ERL_NIF_INIT(Elixir.EXLA.NIF, exla_funcs, &load, NULL, NULL, NULL); +ERL_NIF_INIT(Elixir.EXLA.NIF, exla_funcs, &load, NULL, &upgrade, NULL);