mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
gallium: add pipe_context::ml_subgraph_deserialize()
Add ml_subgraph_deserialize() to pipe_context for reconstructing a previously-serialized ML subgraph at runtime. This complements ml_subgraph_serialize() on pipe_ml_device and allows the runtime to load pre-compiled subgraphs. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40578>
This commit is contained in:
parent
aff92add98
commit
6bae0b55d0
1 changed files with 12 additions and 0 deletions
|
|
@ -1276,6 +1276,18 @@ struct pipe_context {
|
|||
struct pipe_ml_subgraph *subgraph,
|
||||
unsigned outputs_count, unsigned output_idxs[],
|
||||
void *outputs[], bool is_signed[]);
|
||||
|
||||
/**
|
||||
* Deserialize a previously-serialized ML subgraph.
|
||||
*
|
||||
* \param context pipe context
|
||||
* \param data serialized subgraph data
|
||||
* \param size size of the serialized data in bytes
|
||||
* \return a newly allocated pipe_ml_subgraph, or NULL on failure
|
||||
*/
|
||||
struct pipe_ml_subgraph *(*ml_subgraph_deserialize)(struct pipe_context *context,
|
||||
const uint8_t *data,
|
||||
size_t size);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue