Function: set_stream_res_limit
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Sets the device resource limits of a specified stream.
This API must be called after the acl.rt.set_device API is called and before the operator is executed. If you set device resource limits for the same stream multiple times, the last setting takes effect.
After this API is called to set the device resource limit of a specified stream, the acl.rt.use_stream_res_in_current_thread API needs to be called to set the device resource limit of the specified stream used in the current thread. You can call acl.rt.get_stream_res_limit to query the default resource limits.
Prototype
- C Prototype
aclError aclrtSetStreamResLimit(aclrtStream stream, aclrtDevResLimitType type, uint32_t value)
- Python Function
1ret = acl.rt.set_stream_res_limit(stream, type , value)
Parameters
Parameter |
Description |
|---|---|
stream |
Int, specified stream. If 0 is passed, it indicates the default stream. |
type |
Int, resource type. Currently, Cube Core and Vector Core are supported. For details, see the new data structure by calling aclrtDevResLimitType. |
value |
Int, resource limit. |
Return Value
Return Value |
Description |
|---|---|
ret |
Int, 0 on success; else, failure. |