File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
shim_et/xplat/executorch/codegen Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -641,6 +641,20 @@ 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 is_xplat ():
646+ warning ("WARNING: dtype_selective_build is only available in xplat. Proceeding without dtype selective build for lib: {}." .format (name ))
647+
648+ # Dtype selective build is enabled on portable and optimized kernel libraries.
649+ if (not "//executorch/kernels/portable:operators" in kernel_deps ) and (not "//executorch/kernels/optimized:optimized_operators" in kernel_deps ):
650+ fail ("""Dtype_selective_build is enabled and kernel_deps does not contain portable or optimized dependencies.
651+ Please add one of these to kernel_deps:
652+ //executorch/kernels/portable:operators
653+ //executorch/kernels/optimized:optimized_operators
654+ This will tell the build system to rebuild portable/optimized with dtype selective build enabled.
655+ Currently, kernel_deps contains {}.
656+ """ .format (kernel_deps ))
657+
644658 aten_suffix = "_aten" if aten_mode else ""
645659
646660 # merge functions.yaml with fallback yaml
You can’t perform that action at this time.
0 commit comments