SIGN IN SIGN UP

Dtype selective build refactor (#3938)

Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/3938

1. Add dtype_selective_build as an option to executorch_generated_lib
2. Copy portable source and header files into codegen.bzl directory (this is the caller's directory, eg. examples/selective_build)
3. If kernel_deps contains portable_ops, remove it and use the source files

Note: dtype selective build only available for xplat. `header_namespace` is only available in xplat, used to link headers into correct place.
```
error: fail: cpp_library(): the `header_namespace` parameter is *not* supported in fbcode -- `#include` paths must match their fbcode-relative path. (executorch/backends/vulkan/serialization/schema/vk_delegate_schema)
```

New API usage:

```
executorch_generated_lib(
...
dtype_selective_build = True,
...
)
```

Reviewed By: larryliu0820

Differential Revision: D58396325

fbshipit-source-id: 739ebc6b94ffa5f791e125442804a2fff27eb176
L
Lucy Qiu committed
1547bcf6fbbc72f67f43409bd983bdaf668d2a62
Parent: 7f0c0b8
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 6/13/2024, 2:29:17 PM