SetGraphConstMemoryBase
Description
Sets the const memory base address of a graph. The memory size is obtained from GetCompiledGraphSummary > GetConstMemorySize.
Prototype
Status SetGraphConstMemoryBase(uint32_t graph_id, const void *const memory, size_t size);
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
graph_id |
Input |
Subgraph ID. |
memory |
Input |
Base address of the configured const memory. |
size |
Input |
Configured const memory size. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
Status |
SUCCESS: The setting is successful. FAILED: The setting fails. |
Restrictions
- Before calling this API, you must call CompileGraph to compile the graph.
- Each graph can be set only once and cannot be updated.
- This API applies only to statically compiled graphs. You can call the IsStatic API in GetCompiledGraphSummary to check whether a graph is statically compiled.
- If this API is used and RegisterExternalAllocator is configured, RegisterExternalAllocator does not take effect.
Parent topic: Graph Running APIs