Commit Graph

4 Commits

Author SHA1 Message Date
David Dunleavy
994febe935 Add .bazel suffix to some third_party files
PiperOrigin-RevId: 734359305
2025-03-06 18:29:15 -08:00
Vadym Matsishevskyi
5720ab7845 Introduce pywrap bazel rules and migrate Tensorflow to it
The gist of this change (the new rules implementation) is contained within `rules_pywrap` folder. The rules are generic and not tensorflow-specific

1) (internal-specific)

2) (internal-specific)

3) It provides same linking strategy of final artifacts on all 3 supported platforms (no major differences between Linux, Mac and Windows).

4) It makes it possible to abandon usage of header-only targets to prevent ODR violations. Simply speaking you can now depend on generated protobuf message classes normally, without need to worry how that is linked afterwards.

5) The current version is backward-compatible and unless explicitly enabled is a no-op. To enable the new rules pass `--repo_env=USE_PYWRAP_RULES=True` flag to build/test command.

6) The `if_pywrap` construct is temporary and will be removed once full migration is completed. Currently if_pywrap is mainly used to pass normal dependencies (instead of header-only). The header-only stuff is kept for backward compatibility and smoother migration but will be eventually removed.

7) This CL migrates TF and the most problematic among all google ML repositories. Once TF is sabilized the other repositories, such as JAX and XLA will be migrated too (which should be way easier than migrating TF anyways)

PiperOrigin-RevId: 684324990
2024-10-10 00:12:03 -07:00
Russell Power
d702027b3c Introduce C++ OperationHandle type and move simple methods from ops.py::Operation onto it.
Over time we would like to move most graph manipulation machinery out of Python and into these internal classes.

PiperOrigin-RevId: 509274663
2023-02-13 10:55:38 -08:00
Russell Power
e3d3f0c059 Add pybind11_protobuf dependency for native protobuf passing through pybind11.
PiperOrigin-RevId: 508778483
2023-02-10 16:18:53 -08:00