From 34fe9a6a1ded9c50720225d08584ce289d6e7708 Mon Sep 17 00:00:00 2001 From: Jhen Date: Wed, 11 Oct 2023 09:48:57 +0800 Subject: [PATCH] feat(ios): add RNWHISPER_ENABLE_METAL env in podspec --- whisper-rn.podspec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/whisper-rn.podspec b/whisper-rn.podspec index 2b1739c..2fd1f8e 100644 --- a/whisper-rn.podspec +++ b/whisper-rn.podspec @@ -16,10 +16,10 @@ if ENV['RNWHISPER_DISABLE_COREML'] != '1' then base_compiler_flags += " -DWHISPER_USE_COREML -DWHISPER_COREML_ALLOW_FALLBACK" end -# TODO: Enable Metal -# if ENV["RNWHISPER_DISABLE_METAL"] != "1" then -# base_compiler_flags += " -DWSP_GGML_USE_METAL" # -DWSP_GGML_METAL_NDEBUG -# end +# TODO: Enable Metal by default when we have use_gpu param +if ENV["RNWHISPER_ENABLE_METAL"] == "1" then + base_compiler_flags += " -DWSP_GGML_USE_METAL" # -DWSP_GGML_METAL_NDEBUG +end Pod::Spec.new do |s| s.name = "whisper-rn"