Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support selector for functions.yaml and custom_ops.yaml targets in et…
…_operator_library (pytorch#5957) Summary: Pull Request resolved: pytorch#5957 executorch_generated_library accepts functions_yaml_target: A Buck target pointing to the `functions.yaml` file to use. Optional, but at least one of `functions_yaml_target` and `custom_ops_yaml_target` must be specified. custom_ops_yaml_target: A Buck target pointing to the `custom_ops.yaml` file to use. Optional, but at least one of `functions_yaml_target` and `custom_ops_yaml_target` must be specified. However the rule expects these targets to be the string of the exact target "//xplat/..../functions_yaml:functions.yaml" and had issues with the parameter being of type 'selector' select({"//arvr:my_constraint": "//xplat/..../functions_yaml:functions.yaml", ....}) Selectively providing this target based off of config/constraint can be helpful, and it seems like the limitation was the formatting done on the strings prior to calling genrules inside of the rule. What this enables: Building the same et_operator_library target while specifying the functions.yaml and custom_ops.yaml targets as a function of a constraint, like processor type. Example: D64004596 Reviewed By: tarun292, larryliu0820 Differential Revision: D63043331 fbshipit-source-id: 9ef00f2a7625b0b29ae860513d1044923d0a4a34
- Loading branch information