提交 8f7fa90c 编写于 作者: M Megvii Engine Team

fix(lite): fix lar cuda option crash for mdl model

GitOrigin-RevId: f886b42eae7efb7d55b198d8d3acf94ba1e9e1f4
上级 1071f2ab
......@@ -80,7 +80,9 @@ void XPUDeviceOption::config_model_internel<ModelMdl>(
if (enable_cuda) {
mgb_log_warn("using cuda device\n");
model->get_mdl_config().comp_node_mapper = [](mgb::CompNode::Locator& loc) {
loc.type = mgb::CompNode::DeviceType::CUDA;
if (loc.type == mgb::CompNode::DeviceType::UNSPEC) {
loc.type = mgb::CompNode::DeviceType::CUDA;
}
loc.device = 0;
};
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册