Function: get_res_in_current_thread
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Obtains the device resources that can be used by the current thread.
The value is returned based on the following sequence: first the device resource limit of the stream (set by calling acl.rt.set_stream_res_limit), then the device resource limit of the current process (set by calling acl.rt.set_device_res_limit), and finally the default hardware resource limit of the Ascend AI Processor.
Prototype
- C Prototype
aclError aclrtGetResInCurrentThread(aclrtDevResLimitType type, uint32_t *value)
- Python Function
1value, ret = acl.rt.get_res_in_current_thread(type)
Parameter Description
Parameter |
Description |
|---|---|
type |
Int, resource type. Currently, Cube Core and Vector Core are supported. For details, see the new data structure by calling aclrtDevResLimitType. |
Return Value Description
Return Value |
Description |
|---|---|
value |
Int, resource limit of the current thread. |
ret |
Int, 0 on success; else, failure. |