LocalMemAllocator构造函数
产品支持情况
- Ascend 950PR&950DT系列产品:支持
- Atlas A3系列产品:支持
- Atlas A2系列产品:支持
- Atlas 200I/500 A2推理产品:不支持
- Atlas推理系列产品AI Core:支持
- Atlas推理系列产品Vector Core:支持
- Atlas训练系列产品:不支持
功能说明
头文件路径为:"basic_api/kernel_tensor.h"。
LocalMemAllocator构造函数。
函数原型
C++
template <Hardware hard>
__aicore__ inline LocalMemAllocator<hard>::LocalMemAllocator()
参数说明
表1 模板参数说明
参数名 | 描述 |
|---|---|
hard | 用于表示数据的物理位置,Hardware枚举类型,定义如下,合法位置为:Unified Buffer(UB)、L1、L0A、L0B、L0C、BIAS、FIXBUF。 enum class Hardware : uint8_t {
GM, // Global Memory
UB, // UB
L1, // L1 Buffer
L0A, // L0A Buffer
L0B, // L0B Buffer
L0C, // L0C Buffer
BIAS, // BiasTable Buffer
FIXBUF, // Fixpipe Buffer
MAX }; |
返回值说明
无
约束说明
同一个物理位置的LocalMemAllocator对象,在算子生命周期内只能存在1个。