Function: set_stream_res_limit
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Sets the device resource limits of a specified stream.
This API must be called after calling acl.rt.set_device and before operators are executed. If the same stream is set for multiple times, the last setting takes effect.
After the device resource limits of a specified stream are set using this API, you can call acl.rt.use_stream_res_in_current_thread to set the device resource limits of the specified stream 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)
Parameter Description
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 Description
Return Value |
Description |
|---|---|
ret |
Int, 0 on success; else, failure. |