---
title: 函数：destroy_stream_force
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclpythondevg_01_0082.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclpythondevg_01_0082.html
indexId: 729b3199e4ab91792637561b9599607e67d4f62687e65ef6d4d19f4c8ef7308371
---
# 函数：destroy_stream_force

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |


#### 功能说明

销毁指定Stream，销毁通过acl.rt.create_stream或acl.rt.create_stream_with_config接口创建的Stream，若Stream上有未完成的任务，不会等待任务完成，直接强制销毁Stream。


#### 函数原型

- C函数原型
  1 aclError aclrtDestroyStreamForce(aclrtStream stream)

- python函数
  1 ret = acl.rt.destroy_stream_force(stream)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| stream | int，待销毁的Stream的指针地址。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| ret | int，错误码，返回0表示成功，返回其它值表示失败。 |


#### 约束说明

调用本接口销毁指定Stream时，需确保该Stream在当前Context下。
