File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
shim_et/xplat/executorch/codegen Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -641,6 +641,21 @@ def executorch_generated_lib(
641641 if not aten_mode and not functions_yaml_target and not custom_ops_yaml_target :
642642 fail ("At least one of functions_yaml_target, custom_ops_yaml_target needs to be provided" )
643643
644+ if dtype_selective_build :
645+ if (not "//executorch/kernels/portable:operators" in kernel_deps ) and (not "//executorch/kernels/optimized:optimized_operators" in kernel_deps ):
646+ fail ("""
647+ !!WARNING!! Dtype selective build is available for the portable and optimized kernel libraries.
648+ If you are using those, please add them to `kernel_deps` in `executorch_generated_lib`:
649+ //executorch/kernels/portable:operators
650+ //executorch/kernels/optimized:optimized_operators
651+ This will tell the build system to rebuild portable/optimized with the dtype selective build header.
652+ For examples, see: //executorch/examples/selective_build/targets.bzl
653+ Currently, kernel_deps contains {}.
654+
655+ If you have a custom kernel library, please remove `dtype_selective_build=True`
656+ and use regular selective build.
657+ """ .format (kernel_deps ))
658+
644659 aten_suffix = "_aten" if aten_mode else ""
645660
646661 # merge functions.yaml with fallback yaml
You can’t perform that action at this time.
0 commit comments