From 26b54f0890fa855ac270c39ae5b9171c65ec3fa8 Mon Sep 17 00:00:00 2001 From: Kimish Patel Date: Mon, 28 Oct 2024 08:47:41 -0700 Subject: [PATCH] [Executorch][llm] Compile custom op with -O2 This enable some optimizations for inlining vectorized lib functions Differential Revision: [D64910576](https://our.internmc.facebook.com/intern/diff/D64910576/) [ghstack-poisoned] --- extension/llm/custom_ops/targets.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/llm/custom_ops/targets.bzl b/extension/llm/custom_ops/targets.bzl index c2843f5c2f7..dcc172e2641 100644 --- a/extension/llm/custom_ops/targets.bzl +++ b/extension/llm/custom_ops/targets.bzl @@ -34,7 +34,7 @@ def define_common_targets(): "//executorch/kernels/portable/cpu/util:reduce_util", "//executorch/extension/llm/custom_ops/spinquant:fast_hadamard_transform", ], - compiler_flags = ["-Wno-missing-prototypes", "-Wno-global-constructors"], + compiler_flags = ["-Wno-missing-prototypes", "-Wno-global-constructors", "-O2"], visibility = [ "//executorch/...", "//executorch/extension/llm/custom_ops/...",