Allow kernel cache path to be specified without trailing path delimiter

PiperOrigin-RevId: 489891079
This commit is contained in:
MediaPipe Team 2022-11-20 22:18:49 -08:00 committed by Copybara-Service
parent 3ac7f6a216
commit 13c6b9a8c6

View File

@ -241,9 +241,9 @@ absl::Status InferenceCalculatorGlAdvancedImpl::OnDiskCacheHelper::Init(
gpu_delegate_options.has_model_token(); gpu_delegate_options.has_model_token();
if (use_kernel_caching_) { if (use_kernel_caching_) {
cached_kernel_filename_ = gpu_delegate_options.cached_kernel_path() + cached_kernel_filename_ = mediapipe::file::JoinPath(
mediapipe::File::Basename(options.model_path()) + gpu_delegate_options.cached_kernel_path(),
".ker"; mediapipe::File::Basename(options.model_path()) + ".ker");
} }
if (use_serialized_model_) { if (use_serialized_model_) {
serialized_model_path_ = serialized_model_path_ =