Skip to content

Commit d825fd4

Browse files
authored
Resolve host vs target num kernels issue for product et builds
Differential Revision: D82579896 Pull Request resolved: #14365
1 parent 00ea1b7 commit d825fd4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

runtime/kernel/targets.bzl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "get_aten_mode_opt
33
def _operator_registry_preprocessor_flags():
44
max_kernel_num = native.read_config("executorch", "max_kernel_num", None)
55
if max_kernel_num != None:
6-
return ["-DMAX_KERNEL_NUM=" + max_kernel_num]
6+
return select({
7+
"DEFAULT": ["-DMAX_KERNEL_NUM=" + max_kernel_num],
8+
"ovr_config//build_mode/constraints:arvr_is_host_platform": []
9+
})
710
elif not runtime.is_oss:
811
return select({
912
"DEFAULT": [],

0 commit comments

Comments
 (0)