Commit 0d1250a
Support selector for functions.yaml and custom_ops.yaml targets in et_operator_library (#5957)
Summary:
Pull Request resolved: #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: 9ef00f2a7625b0b29ae860513d1044923d0a4a341 parent ed9f50f commit 0d1250a
1 file changed
+17
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
261 | 262 | | |
262 | 263 | | |
263 | 264 | | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
264 | 270 | | |
265 | | - | |
| 271 | + | |
266 | 272 | | |
267 | 273 | | |
268 | 274 | | |
| |||
294 | 300 | | |
295 | 301 | | |
296 | 302 | | |
297 | | - | |
| 303 | + | |
298 | 304 | | |
299 | 305 | | |
300 | 306 | | |
| |||
495 | 501 | | |
496 | 502 | | |
497 | 503 | | |
498 | | - | |
499 | | - | |
500 | | - | |
| 504 | + | |
| 505 | + | |
501 | 506 | | |
502 | 507 | | |
503 | 508 | | |
| |||
512 | 517 | | |
513 | 518 | | |
514 | 519 | | |
515 | | - | |
| 520 | + | |
516 | 521 | | |
517 | 522 | | |
518 | 523 | | |
| |||
559 | 564 | | |
560 | 565 | | |
561 | 566 | | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
562 | 572 | | |
563 | 573 | | |
564 | | - | |
| 574 | + | |
565 | 575 | | |
566 | 576 | | |
567 | 577 | | |
| |||
0 commit comments