From 6a5171e3e85d6aa1c398513f4f3a03c55b543991 Mon Sep 17 00:00:00 2001 From: Kimish Patel Date: Mon, 28 Oct 2024 08:47:45 -0700 Subject: [PATCH] [Executorch][Portable] Compile portable ops with -O2 prefill toks: 21 decode: 11 after: e2e 621ms, prefil:: 370ms, decode: 43.84 tok/sec Differential Revision: [D64910578](https://our.internmc.facebook.com/intern/diff/D64910578/) [ghstack-poisoned] --- shim/xplat/executorch/kernels/portable/op_registration_util.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shim/xplat/executorch/kernels/portable/op_registration_util.bzl b/shim/xplat/executorch/kernels/portable/op_registration_util.bzl index ef170d62970..dad8b14b265 100644 --- a/shim/xplat/executorch/kernels/portable/op_registration_util.bzl +++ b/shim/xplat/executorch/kernels/portable/op_registration_util.bzl @@ -122,7 +122,7 @@ def define_op_library(name, deps, android_deps, aten_target, _allow_third_party_ fbandroid_platform_deps = android_deps, # kernels often have helpers with no prototypes just disabling the warning here as the headers # are codegend and linked in later - compiler_flags = ["-Wno-missing-prototypes"] + ( + compiler_flags = ["-Wno-missing-prototypes", "-O2"] + ( # For shared library build, we don't want to expose symbols of # kernel implementation (ex torch::executor::native::tanh_out) # to library users. They should use kernels through registry only.