Function: use_stream_res_in_current_thread

Applicability

Product

Supported (√/x)

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas training products

Atlas inference products

Atlas 200I/500 A2 inference products

Function Usage

Sets the device resource limits of a specified stream in the current thread. If this API is called to set the stream for multiple times, the last setting takes effect.

Call acl.rt.set_stream_res_limit to set the device resource limits of the stream first.

Prototype

  • C Prototype
    aclError aclrtUseStreamResInCurrentThread(aclrtStream stream)
  • Python Function
    1
    ret = acl.rt.use_stream_res_in_current_thread(stream)
    

Parameter Description

Parameter

Description

stream

Int, specified stream. If 0 is passed, it indicates the default stream.

Return Value Description

Return Value

Description

ret

Int, 0 on success; else, failure.