beta)torch_npu.npu.config.allow_internal_format

接口原型

torch_npu.npu.config.allow_internal_format = bool

功能描述

是否使用私有格式,设置为True时允许使用私有格式,设置为False时,不允许申请任何私有格式的tensor,避免了适配层出现私有格式流通。

参数说明

输入bool值,默认值为True。

调用示例

>>>torch_npu.npu.config.allow_internal_format = False