ethosu: implement ml_device_destroy for standalone ML device
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Use ralloc_free to release the device allocated by
ethosu_ml_device_create().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40578>
This commit is contained in:
Tomeu Vizoso 2026-03-26 09:18:05 +01:00
parent f06b4dbe33
commit e23fcc1464

View file

@ -249,6 +249,12 @@ set_device_arch(struct ethosu_ml_device *device, bool is_u65)
}
}
static void
ethosu_ml_device_destroy(struct pipe_ml_device *pdev)
{
ralloc_free(pdev);
}
static void
set_device_callbacks(struct ethosu_ml_device *device)
{
@ -256,6 +262,7 @@ set_device_callbacks(struct ethosu_ml_device *device)
device->base.ml_subgraph_create = ethosu_ml_subgraph_create;
device->base.ml_subgraph_serialize = ethosu_ml_subgraph_serialize;
device->base.ml_subgraph_destroy = ethosu_ml_subgraph_destroy;
device->base.ml_device_destroy = ethosu_ml_device_destroy;
}
struct pipe_screen *