Pose detector uses advanced_gpu_api
for gpu inference to resolve unsupported gpu op issue.
PiperOrigin-RevId: 528879218
This commit is contained in:
parent
9ce16fddeb
commit
4d9812af43
|
@ -108,9 +108,18 @@ absl::Status SetSubTaskBaseOptions(const ModelAssetBundleResources& resources,
|
||||||
->mutable_model_asset(),
|
->mutable_model_asset(),
|
||||||
is_copy);
|
is_copy);
|
||||||
}
|
}
|
||||||
|
if (options->base_options().acceleration().has_gpu()) {
|
||||||
|
core::proto::Acceleration gpu_accel;
|
||||||
|
gpu_accel.mutable_gpu()->set_use_advanced_gpu_api(true);
|
||||||
|
pose_detector_graph_options->mutable_base_options()
|
||||||
|
->mutable_acceleration()
|
||||||
|
->CopyFrom(gpu_accel);
|
||||||
|
|
||||||
|
} else {
|
||||||
pose_detector_graph_options->mutable_base_options()
|
pose_detector_graph_options->mutable_base_options()
|
||||||
->mutable_acceleration()
|
->mutable_acceleration()
|
||||||
->CopyFrom(options->base_options().acceleration());
|
->CopyFrom(options->base_options().acceleration());
|
||||||
|
}
|
||||||
pose_detector_graph_options->mutable_base_options()->set_use_stream_mode(
|
pose_detector_graph_options->mutable_base_options()->set_use_stream_mode(
|
||||||
options->base_options().use_stream_mode());
|
options->base_options().use_stream_mode());
|
||||||
auto* pose_landmarks_detector_graph_options =
|
auto* pose_landmarks_detector_graph_options =
|
||||||
|
|
Loading…
Reference in New Issue
Block a user