torch_npu.npu.config.allow_internal_format = bool
是否使用私有格式,设置为True时允许使用私有格式,设置为False时,不允许申请任何私有格式的tensor,避免了适配层出现私有格式流通。
输入bool值,Atlas 训练系列产品/Atlas A2 训练系列产品/Atlas 推理系列产品默认值为True。Atlas A3 训练系列产品默认值为False。
1
>>>torch_npu.npu.config.allow_internal_format = False