未验证 提交 2b97c6e2 编写于 作者: C cc 提交者: GitHub

[Opt] Add places of int64 and any precision in opt (#3622)

* Add places of int64 and any precision in opt, test=develop
上级 507d68a1
......@@ -92,6 +92,10 @@ std::vector<Place> ParserValidPlaces() {
Place{TARGET(kARM), PRECISION(kFloat), DATALAYOUT(kNCHW)});
valid_places.emplace_back(
Place{TARGET(kARM), PRECISION(kInt32), DATALAYOUT(kNCHW)});
valid_places.emplace_back(
Place{TARGET(kARM), PRECISION(kInt64), DATALAYOUT(kNCHW)});
valid_places.emplace_back(
Place{TARGET(kARM), PRECISION(kAny), DATALAYOUT(kNCHW)});
} else if (target_repr == "opencl") {
valid_places.emplace_back(
Place{TARGET(kOpenCL), PRECISION(kFP16), DATALAYOUT(kImageDefault)});
......
......@@ -50,7 +50,14 @@ void OptBase::SetValidPlaces(const std::string& valid_places) {
auto target_reprs = lite::Split(valid_places, ",");
for (auto& target_repr : target_reprs) {
if (target_repr == "arm") {
valid_places_.emplace_back(TARGET(kARM));
valid_places_.emplace_back(
Place{TARGET(kARM), PRECISION(kFloat), DATALAYOUT(kNCHW)});
valid_places_.emplace_back(
Place{TARGET(kARM), PRECISION(kInt32), DATALAYOUT(kNCHW)});
valid_places_.emplace_back(
Place{TARGET(kARM), PRECISION(kInt64), DATALAYOUT(kNCHW)});
valid_places_.emplace_back(
Place{TARGET(kARM), PRECISION(kAny), DATALAYOUT(kNCHW)});
} else if (target_repr == "opencl") {
valid_places_.emplace_back(
Place{TARGET(kOpenCL), PRECISION(kFP16), DATALAYOUT(kImageDefault)});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册