feat: change default configuration: precison_mode as must_keep_origin_dtype in Ascend910B1

This commit is contained in:
yangxiaorun
2023-03-09 21:11:12 +08:00
parent d393c937fa
commit 854e13af53
@@ -158,7 +158,7 @@ NpuSysCtrl::NpuSysCtrl() : init_flag_(false), device_id_(0) {}
// set ACL_PRECISION_MODE by SocVersion("allow_fp32_to_fp16" or "must_keep_origin_dtype").
auto precision_mode = c10_npu::GetSocVersion() >= c10_npu::SocVersion::Ascend910B1 ?
"allow_fp32_to_fp16" : "allow_fp32_to_fp16";
"must_keep_origin_dtype" : "allow_fp32_to_fp16";
at_npu::native::AclSetCompileopt(aclCompileOpt::ACL_PRECISION_MODE, precision_mode);
// set default compile cache mode and dir for users to improve op compile time