---
title: create_const_uint64
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/atlasgeapi_07_0772.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/atlasgeapi_07_0772.html
indexId: a37c9767926b9d395c8aee1c2eca110e5c0ff15e59a39b170ffac3231fe7a81e72
---
# create_const_uint64

#### 产品支持情况

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


#### 功能说明

创建uint64常量张量。


#### 函数原型

```
create_const_uint64(value: Union[int, List[int]], shape: Optional[List[int]] = None) -> TensorHolder
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| value | 输入 | 单个整数或整数列表。 |
| shape | 输入 | 可选参数，形状维度。 |


#### 返回值说明

(TensorHolder) 表示常量的张量持有者。


#### 约束说明

- 如果是列表且提供了shape，元素数量必须与shape维度的乘积匹配。
- 如果value不是int或int列表，抛出TypeError。
- 如果值数量与形状不匹配，抛出ValueError。
- 如果常量创建失败，抛出RuntimeError。
