---
title: aclopSetKernelArgs
description: 动态Shape场景下，设置算子Tiling参数、执行并发数。
url: "https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application%20Development%20Guide/aadgc/aclcppdevg_03_0620.html"
---

# aclopSetKernelArgs

#### 函数功能

动态Shape场景下，设置算子Tiling参数、执行并发数。


#### 函数原型

aclError aclopSetKernelArgs(aclopKernelDesc *kernelDesc,

const char *kernelId,

uint32_t blockDim,

const void *args,

uint32_t argSize)


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| kernelDesc | 输入 | Kernel描述缓存，aclopKernelDesc类型的指针。 typedef struct aclopKernelDesc aclopKernelDesc; |
| kernelId | 输入 | 算子执行时要指定的Kernel ID的指针，与调用aclopCreateKernel时传递的kernelId一致。 |
| blockDim | 输入 | Kernel执行的并发AI Core核数。 建议此处设置的blockDim和TIK算子实现时的使用的AI Core核数保持一致。 |
| args | 输入 | Tiling参数的指针。 |
| argSize | 输入 | Tiling参数内存大小，单位为Byte。 |


#### 返回值说明

返回0表示成功，返回其它值表示失败。
