Function: set_device_res_limit
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Sets the device resource limits for the current process.
Prototype
- C Prototype
aclError aclrtSetDeviceResLimit(int32_t deviceId, aclrtDevResLimitType type, uint32_t value)
- Python Function
1ret = acl.rt.set_device_res_limit(device_id, type, value)
Parameter Description
Parameter |
Description |
|---|---|
device_id |
Int, device ID. |
type |
Int, enumerated value. For details, see aclrtDevResLimitType. |
value |
Int, resource limit. |
Return Value Description
Return Value |
Description |
|---|---|
ret |
Int, error code: 0 on success; else, failure. |
Restrictions
This API must be called after set_device is called and before operators are executed. If the same device is set for multiple times, the last setting takes effect.
Parent topic: Runtime Configuration