---
title: kpccl_get_kernel_concurrency_local
description: "获取设置的当前线程的算子并发度的值。"
url: https://www.hikunpeng.com/document/detail/zh/hpchistory/hpckit/develop2400/KunoengHPCKit_developer_049.html
sourcePath: /source/zh/hpchistory/hpckit/develop2400/KunoengHPCKit_developer_049.html
indexId: e661d4ce9802aff2c2ec319625417534aa67def64c25086fb11cc8c2b535513e73
---
# kpccl_get_kernel_concurrency_local

获取设置的当前线程的算子并发度的值。

#### 接口定义

int kpccl_get_kernel_concurrency_local();


#### 返回值

- 返回当前线程的算子并发度的值
- 算子并发度值未设置时返回kpccl_get_kernel_concurrency();


#### 示例

```
#include <stdio.h>
#include "kpccl.h"
int main()
{
kpccl_set_kernel_concurrency_local(2);
int num =
kpccl_get_kernel_concurrency_local
();
printf("local kpccl kernel concurrency = %d\n", num);
return 0;
}
```

运行结果如下。

```
local kpccl kernel concurrency = 2
```

- 上述示例设置并打印了当前线程的算子并发度的值。
- 上述kpccl_get_kernel_concurrency_local函数获取了当前线程的算子并发度。
