Sets the resource context object for the resource identified by the key and hands it over to the resource context manager for management.
This API is generally called by resource operators of the write type, such as stack push.
graphStatus SetResourceContext(const ge::AscendString &key, ResourceContext *resource_context)
| Parameter | Input/Output | Description |
|---|---|---|
| key | Input | Unique resource key. |
| resource_context | Input | Pointer to a resource context object. For details, see the return value of GetResourceContext. |
This API will return a failure if the pointer to the resource context manager is not passed when InferenceContext is created using the Create API.