From b904ade0cf906210c7c885a1866c40cfe9203ac0 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Mon, 23 Oct 2023 11:41:19 -0700 Subject: [PATCH] Allow Mac to use GPU Delegate PiperOrigin-RevId: 575882254 --- mediapipe/tasks/python/core/base_options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediapipe/tasks/python/core/base_options.py b/mediapipe/tasks/python/core/base_options.py index 2d4258fed..da81bcd5d 100644 --- a/mediapipe/tasks/python/core/base_options.py +++ b/mediapipe/tasks/python/core/base_options.py @@ -70,7 +70,7 @@ class BaseOptions: platform_name = platform.system() if self.delegate == BaseOptions.Delegate.GPU: - if platform_name == 'Linux': + if platform_name in ['Linux', 'Darwin']: acceleration_proto = _AccelerationProto(gpu=_DelegateProto.Gpu()) else: raise NotImplementedError(