Skip to content

Commit 596022b

Browse files
committed
[Executorch] Renable operator optimization flags
Pull Request resolved: #6715 Previous attempt at this resulted in revert due to app size increase. Much of this was due to op_div exploding. Two diffs underneath solve this issue ghstack-source-id: 252472697 @exported-using-ghexport Differential Revision: [D65606666](https://our.internmc.facebook.com/intern/diff/D65606666/)
1 parent 19a714a commit 596022b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

shim/xplat/executorch/kernels/portable/op_registration_util.bzl

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,21 @@ load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "is_xplat", "runti
22
load("@fbsource//xplat/executorch/build:selects.bzl", "selects")
33

44
def get_compiler_optimization_flags():
5-
# App size regressons requires this to be baktraced until I have a better solution
5+
# various ovr_configs are not available in oss
6+
if not runtime.is_oss:
7+
compiler_flags = select({
8+
"DEFAULT": [],
9+
"ovr_config//os:android-arm64": [
10+
"-Os",
11+
],
12+
"ovr_config//os:iphoneos": [
13+
"-Os",
14+
],
15+
"ovr_config//os:macos-arm64": [
16+
"-Os",
17+
],
18+
})
19+
return compiler_flags
620
return []
721

822
def op_target(name, deps = [], android_deps = [], _allow_third_party_deps = False, _aten_mode_deps = []):

0 commit comments

Comments
 (0)