函数:use_stream_res_in_current_thread
产品支持情况
产品 |
是否支持 |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
功能说明
在当前线程中使用指定Stream上的Device资源限制。如果多次调用本接口设置Stream,将以最后一次设置为准。
需先调用acl.rt.set_stream_res_limit接口设置该Stream上的Device资源限制。
函数原型
- C函数原型
aclError aclrtUseStreamResInCurrentThread(aclrtStream stream)
- python函数
1ret = acl.rt.use_stream_res_in_current_thread(stream)
参数说明
参数名 |
说明 |
|---|---|
stream |
int,指定stream, 若传入0,则表示默认Stream。 |
返回值说明
返回值 |
说明 |
|---|---|
ret |
int,返回0表示成功,返回其他值表示失败。 |
父主题: 运行时配置