---
title: 函数：set_attr_int
description: "| C函数原型 | aclError aclopSetAttrInt(aclopAttr \\*attr, const char \\*attrName, int64\\_t attrValue); |"
url: "https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application%20Development%20Guide/aadgp/aclpythondevg_01_0769.html"
---

# 函数：set_attr_int

| C函数原型 | aclError aclopSetAttrInt(aclopAttr \*attr, const char \*attrName, int64\_t attrValue); |
| --- | --- |
| Python函数 | ret = acl.op.set\_attr\_int(attr, attr\_name, attr\_value) |
| 函数功能 | 设置int64\_t类型标量的属性值，同步接口。 |
| 输入说明 | attr：int，acl算子属性地址对象, 此对象使用调用acl.op.create\_attr创建。 attr\_name：str，属性名。 attr\_value：int，属性值。 |
| 返回值说明 | ret：int，错误码。 返回0表示成功。 返回其它值表示失败。 |
| 约束说明 | 无 |
