We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
代码: MNN::ScheduleConfig sConfig; sConfig.type = static_cast(MNN_FORWARD_CPU); sConfig.numThread = threadNum; BackendConfig bConfig; bConfig.precision = static_castBackendConfig::PrecisionMode(precision); sConfig.backendConfig = &bConfig; auto session = net->createSession(sConfig);
当precision=2时,推理结果是错误,其他精度可正常推理。 若采用module方式,启用fp16推理结果正常,速度可加速。
看文档这么写: 后端 CPU precision 为 Low 时,根据设备情况开启 FP16 计算 precision 为 Low_BF16 时,根据设备情况开启 BF16 计算 session应该怎么开启fp16?
The text was updated successfully, but these errors were encountered:
版本:2.8.4
Sorry, something went wrong.
大概率是 session api 的调用代码问题。fp16 的输入输出必须用 copyFromHost / copyToHost ,不能直接访问 tensor 的 host 指针。建议都用 Module API.
No branches or pull requests
代码:
MNN::ScheduleConfig sConfig;
sConfig.type = static_cast(MNN_FORWARD_CPU);
sConfig.numThread = threadNum;
BackendConfig bConfig;
bConfig.precision = static_castBackendConfig::PrecisionMode(precision);
sConfig.backendConfig = &bConfig;
auto session = net->createSession(sConfig);
当precision=2时,推理结果是错误,其他精度可正常推理。
若采用module方式,启用fp16推理结果正常,速度可加速。
看文档这么写: 后端 CPU precision 为 Low 时,根据设备情况开启 FP16 计算 precision 为 Low_BF16 时,根据设备情况开启 BF16 计算
session应该怎么开启fp16?
The text was updated successfully, but these errors were encountered: