未验证 提交 b8234efb 编写于 作者: Y Yuan Shuai 提交者: GitHub

[LITE][OPENCL] Fix Places of CXX Config for OpenCL. test=develop (#3462)

* Fix Places of CXX Config for OpenCL. test=develop

* fix shared ptr as unqiue ptr. test=develop
上级 3f5ea092
......@@ -293,6 +293,7 @@ void Predictor::Build(const cpp::ProgramDesc &desc,
// `inner_places` is used to optimize passes
std::vector<Place> inner_places = valid_places;
for (auto &valid_place : valid_places) {
if (valid_place.target == TARGET(kOpenCL)) continue;
inner_places.emplace_back(
Place(TARGET(kHost), valid_place.precision, valid_place.layout));
}
......
......@@ -84,7 +84,7 @@ TEST(slice_image2d_fp16, compute) {
}
LOG(INFO) << "prepare input";
std::shared_ptr<CLImageConverterDefault> default_converter(
std::unique_ptr<CLImageConverterDefault> default_converter(
new CLImageConverterDefault());
DDim image_shape = default_converter->InitImageDimInfoWith(in_dim);
LOG(INFO) << "image_shape = " << image_shape[0] << " " << image_shape[1];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册