torch_npu.npu.aclnn.allow_hf32
接口原型
torch_npu.npu.aclnn.allow_hf32:bool
功能描述
设置conv算子是否支持hf32,一个属性值,对aclnn的allow_hf32属性的设置和查询。
参数说明
bool类型,开启和关闭hf32属性的支持。
输出说明
返回bool类型,返回当前allow_hf32是否开启,默认值为true。
支持的型号
Atlas 训练系列产品 Atlas A2 训练系列产品 Atlas A3 训练系列产品 Atlas 推理系列产品
调用示例
1 2 3 4 5 6 7 8 9 10 11 12 13 | >>> import torch >>>import torch_npu >>> res = torch.npu.aclnn.allow_hf32 >>> res True >>> torch.npu.aclnn.allow_hf32 = False >>> res = torch.npu.aclnn.allow_hf32 >>> res False >>> torch.npu.aclnn.allow_hf32 = True >>> res = torch.npu.aclnn.allow_hf32 >>> res True |
父主题: aclnn