110 Commits
Author SHA1 Message Date
A. Unique TensorFlower a33c850682 [NCCL] Upgrade XLA NCCL version to 2.30.7
PiperOrigin-RevId: 972462168
2026-08-28 04:05:14 -07:00
Antonio Sanchez 4e13725d5a Add Apache license headers.
PiperOrigin-RevId: 960985725
2026-08-07 10:09:35 -07:00
Levon Ter-Grigoryan 48fe0368ff [NCCL] Upgrade XLA NCCL version to 2.29.7
PiperOrigin-RevId: 908006723
2026-04-30 00:55:11 -07:00
Yicheng Luo 2319ce4d80 Move dependencies to separate workspace.bzl files.
PiperOrigin-RevId: 882605251
2026-03-12 09:20:08 -07:00
David Dunleavy c5f3cdb243 Internal dir restructure
PiperOrigin-RevId: 756084150
2025-05-07 18:32:02 -07:00
A. Unique TensorFlower 3b1f42ab1d Refactor cuda, cudnn, nccl repository rules to create CUDA repositories in parallel.
Bazel processes labels in the `load` statements in the beginning of `cuda_configure.bzl` file in parallel, hence CUDA repositories are created in parallel as well.

Previously the CUDA repositories were created sequentially in the order of `repository_ctx.read()` operations inside the `cuda_configure` rule implementation. Bazel creates repositories only when there are direct usages of them, and the list of required CUDA repositories was not known until the repository rule `cuda_configure` was executed.

PiperOrigin-RevId: 745809642
2025-04-09 18:39:02 -07:00
A. Unique TensorFlower fbe4b80b8f Enable loading CUDA redistributions in CPU Linux RBE configurations.
This change is made to prevent hermetic CUDA repositories cache invalidation between the builds with `--config=cuda` and without it.

It should speed up Github presubmit jobs. Currently CPU and GPU jobs use the machines in the same pool, and they share the RBE cache.

Previously the cache was invalidated every time when `TF_NEED_CUDA` value changed between CPU and GPU builds, hence loading CUDA redistributions for GPU jobs took several minutes (see [this job](https://github.com/openxla/xla/actions/runs/14114621736/job/39541688832) for example: all the test results are cached, but CUDA redistributions were still downloaded).

With adding `--repo_env USE_CUDA_REDISTRIBUTIONS=1` to RBE CPU linux job configurations, we load some CUDA redistributions once in RBE cache, and then reuse it between the jobs.

PiperOrigin-RevId: 743700713
2025-04-03 14:47:23 -07:00
A. Unique TensorFlower efbd42568e Add retries to tar command in nccl generated_srcs target.
PiperOrigin-RevId: 736944378
2025-03-14 12:26:35 -07:00
David Dunleavy 994febe935 Add .bazel suffix to some third_party files
PiperOrigin-RevId: 734359305
2025-03-06 18:29:15 -08:00
David Dunleavy 40998f44c0 Move TSL's third_party to XLA, update users
Mostly updating `WORKSPACE` and related files from `@tsl//third_party` -> `@xla//third_party`. Please tag me if this change breaks you.

PiperOrigin-RevId: 733489153
2025-03-04 15:51:50 -08:00
A. Unique TensorFlower 3c53f45c54 Disable warning about changed files in the tar operation.
PiperOrigin-RevId: 733007155
2025-03-03 12:26:09 -08:00
A. Unique TensorFlower bab774dcf9 [NCCL] Fix ras build issue in OSS.
PiperOrigin-RevId: 726180935
2025-02-12 14:08:10 -08:00
A. Unique TensorFlower cf389e5ab7 [NCCL] Upgrade TF NCCL version to 2.25.1
PiperOrigin-RevId: 725521622
2025-02-11 01:25:34 -08:00
A. Unique TensorFlower a64c8f111a Provide Target machine architecture for cross-compile scenarios.
CUDA/CUDNN/NCCL repositories are created on a host machine, so if we need to download redistributions for other architectures in cross-compile scenario, we need to pass the target architecture name to repo rules, e.g. `--repo_env=CUDA_REDIST_TARGET_PLATFORM=aarch64`

PiperOrigin-RevId: 720254498
2025-01-27 12:45:52 -08:00
A. Unique TensorFlower d24c61b7bd Update py_import macros for the ability to unpack additional wheels in the same folder as the main wheel.
Usage example: provide NVIDIA wheel dependencies for ML wheels that have rpaths pointing to NVIDIA folders. When a user executes `pip install tensorflow[and_cuda]`, NVIDIA wheels are installed together with Tensorflow wheel. To reproduce this behavior in hermetic Python approach, we need to define `py_import` as follows (provided NVIDIA dependencies are defined in `requirements.in` and requirements lock files):

        py_import(
            name = "tf_py_import",
            wheel = ":wheel",
            deps = [
                "@pypi_absl_py//:pkg",
                "@pypi_astunparse//:pkg",
                "@pypi_flatbuffers//:pkg",
                "@pypi_gast//:pkg",
                "@pypi_ml_dtypes//:pkg",
                "@pypi_numpy//:pkg",
                "@pypi_opt_einsum//:pkg",
                "@pypi_packaging//:pkg",
                "@pypi_protobuf//:pkg",
                "@pypi_requests//:pkg",
                "@pypi_termcolor//:pkg",
                "@pypi_typing_extensions//:pkg",
                "@pypi_wrapt//:pkg",
            ],
            wheel_deps = [
                "@pypi_nvidia_cublas_cu12//:whl",
                "@pypi_nvidia_cuda_cupti_cu12//:whl",
                "@pypi_nvidia_cuda_nvcc_cu12//:whl",
                "@pypi_nvidia_cuda_nvrtc_cu12//:whl",
                "@pypi_nvidia_cuda_runtime_cu12//:whl",
                "@pypi_nvidia_cudnn_cu12//:whl",
                "@pypi_nvidia_cufft_cu12//:whl",
                "@pypi_nvidia_curand_cu12//:whl",
                "@pypi_nvidia_cusolver_cu12//:whl",
                "@pypi_nvidia_cusparse_cu12//:whl",
                "@pypi_nvidia_nccl_cu12//:whl",
                "@pypi_nvidia_nvjitlink_cu12//:whl",
            ],
        )

PiperOrigin-RevId: 705666137
2024-12-12 16:33:05 -08:00
David Dunleavy e435325dab Move tsl/platform/{cloud,default,windows} to xla/tsl/platform
PiperOrigin-RevId: 698575496
2024-11-20 18:15:47 -08:00
A. Unique TensorFlower 6adae99976 [NCCL] Upgrade TF NCCL version to 2.23.4
PiperOrigin-RevId: 684819618
2024-10-11 06:49:31 -07:00
A. Unique TensorFlower cf3b94729e Add nccl_headers alias to the content of BUILD file in NCCL repository when NCCL stub is not used.
PiperOrigin-RevId: 676578558
2024-09-19 15:26:33 -07:00
A. Unique TensorFlower 2f7f2f9d67 Remove CUDA and NCCL repository rules calls from RBE configs.
The CUDA and NCCL repositories are created on a host machine now and shared via Bazel cache between host and remote machines.

PiperOrigin-RevId: 671089856
2024-09-04 14:03:13 -07:00
A. Unique TensorFlower 0575a9d389 Add remotable versions of cuda_configure and nccl_configure.
This is needed to support remote execution of the builds.

PiperOrigin-RevId: 667716195
2024-08-26 15:23:56 -07:00
A. Unique TensorFlower d9071b91c4 Refactor hermetic CUDA flags and update --config=cuda to add CUDA dependencies both for bazel build and bazel test phases.
Add `--@local_config_cuda//cuda:override_include_cuda_libs` to override settings for TF wheel.

Forbid building TF wheel with `--@local_config_cuda//cuda:include_cuda_libs=true`

PiperOrigin-RevId: 666848518
2024-08-23 11:43:31 -07:00
A. Unique TensorFlower 9b5fa66dc6 Introduce hermetic CUDA in Google ML projects.
1) Hermetic CUDA rules allow building wheels with GPU support on a machine without GPUs, as well as running Bazel GPU tests on a machine with only GPUs and NVIDIA driver installed. When `--config=cuda` is provided in Bazel options, Bazel will download CUDA, CUDNN and NCCL redistributions in the cache, and use them during build and test phases.

    [Default location of CUNN redistributions](https://developer.download.nvidia.com/compute/cudnn/redist/)

    [Default location of CUDA redistributions](https://developer.download.nvidia.com/compute/cuda/redist/)

    [Default location of NCCL redistributions](https://pypi.org/project/nvidia-nccl-cu12/#history)

2) To include hermetic CUDA rules in your project, add the following in the WORKSPACE of the downstream project dependent on XLA.

   Note: use `@local_tsl` instead of `@tsl` in Tensorflow project.

   ```
   load(
      "@tsl//third_party/gpus/cuda/hermetic:cuda_json_init_repository.bzl",
      "cuda_json_init_repository",
   )

   cuda_json_init_repository()

   load(
      "@cuda_redist_json//:distributions.bzl",
      "CUDA_REDISTRIBUTIONS",
      "CUDNN_REDISTRIBUTIONS",
   )
   load(
      "@tsl//third_party/gpus/cuda/hermetic:cuda_redist_init_repositories.bzl",
      "cuda_redist_init_repositories",
      "cudnn_redist_init_repository",
   )

   cuda_redist_init_repositories(
      cuda_redistributions = CUDA_REDISTRIBUTIONS,
   )

   cudnn_redist_init_repository(
      cudnn_redistributions = CUDNN_REDISTRIBUTIONS,
   )

   load(
      "@tsl//third_party/gpus/cuda/hermetic:cuda_configure.bzl",
      "cuda_configure",
   )

   cuda_configure(name = "local_config_cuda")

   load(
      "@tsl//third_party/nccl/hermetic:nccl_redist_init_repository.bzl",
      "nccl_redist_init_repository",
   )

   nccl_redist_init_repository()

   load(
      "@tsl//third_party/nccl/hermetic:nccl_configure.bzl",
      "nccl_configure",
   )

   nccl_configure(name = "local_config_nccl")
   ```

PiperOrigin-RevId: 662981325
2024-08-14 11:47:44 -07:00
A. Unique TensorFlower 9be165903d [NCCL] Upgrade TF NCCL version to 2.21.5
PiperOrigin-RevId: 646800346
2024-06-26 03:29:10 -07:00
David Dunleavy 068cfff65d Move tsl/BUILD, tsl.bzl, and tsl.default.bzl to XLA
PiperOrigin-RevId: 623215553
2024-04-09 11:15:11 -07:00
David Dunleavy 6a9ceaedc5 Minimize number of Copybara transforms that operate on tensorflow/third_party
PiperOrigin-RevId: 621679504
2024-04-03 17:42:26 -07:00
A. Unique TensorFlower aa6da142f3 Merged commit includes the following changes:
619575611  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Run buildifier on all files where it sorts loads differently

--
619498661  by A. Unique TensorFlower<gardener@tensorflow.org>:

    [XLA:GPU][IndexAnalysis] Rename GetDefaultThreadIdToOutputIndexingMap to GetDefaultThreadIdIndexingMap.

    The "output" part was a bit confusing. We use this function for threadId->input
    mapping as well.

--
619490165  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Convert S8 to BF16 in one step without going though F32.

--

PiperOrigin-RevId: 619575611
2024-03-27 18:00:18 +00:00
David Dunleavy 6401161dbe Move tsl/cuda to xla/tsl/cuda
PiperOrigin-RevId: 610550833
2024-02-26 15:52:30 -08:00
A. Unique TensorFlower 262d7ab67e [NCCL] Upgrade TF NCCL version to 2.19.3
PiperOrigin-RevId: 591797964
2023-12-17 23:43:49 -08:00
A. Unique TensorFlower 78de87ba6e [NCCL] Upgrade TF NCCL version to 2.18.5
PiperOrigin-RevId: 576427971
2023-10-25 00:40:59 -07:00
Peter Hawkins 1536f2ca22 Fix path to cuda_build_defs in NCCL system build.
Copy of https://github.com/openxla/xla/pull/6291 that resolves a TSL merge problem.

PiperOrigin-RevId: 573259068
2023-10-13 10:49:28 -07:00
Peter Hawkins a089c4b277 Fix TF_NCCL_VERSION detection.
The current macro substitution wasn't working and is resolving to %{nccl_version} rather than a version string. Instead, add code to create a NCCL config header (nccl_config.h), and use that to detect the .so version we should be opening.

This change should only affect NCCL when obtained via a stub, which is currently only used by an unreleased version of JAX.

PiperOrigin-RevId: 571081917
2023-10-05 11:36:53 -07:00
A. Unique TensorFlower f2957eb767 Reenable file upload in bazel remote config
This replaces the "transfer script via cli argument" hack by the upload support for remote configurations that landed in Bazel 3.1.0.

PiperOrigin-RevId: 569079584
2023-09-27 23:45:55 -07:00
Peter Hawkins f21782ea1d [tsl] Add the option to obtain NCCL via a stub, rather than linking it statically or dynamically.
NCCL via a stub is enabled if the environment variable TF_NCCL_USE_STUB=1 is set.

The intent is to use this option in JAX to reduce the size of the CUDA wheels. NCCL takes up about 80MB in each compiled JAX wheel and takes a significant amount of time to build. It is possible other users of TSL may wish to do this also.

PiperOrigin-RevId: 568344701
2023-09-25 15:52:21 -07:00
A. Unique TensorFlower 4b8f8a33ac Fix NCCL UB issue
This is fixing a UB issue which occurs with newer version of Clang (17+).
The fix is also upstreamed through https://github.com/NVIDIA/nccl/pull/916.

In addition I'm changing the handling of `enqueue.cc` which needs to be compiled
in cuda mode under clang. The previous solution with just passing in the `-x cuda` option fails with CUDA 12+.

I'm also correcting the version number that we set in the patch - not sure if this version is reported in some logs, but if it is, it should be correct.

PiperOrigin-RevId: 564811002
2023-09-12 13:17:26 -07:00
Jake Harmon 132c98b29c Vendor XLA/TSL into TensorFlow as Bazel dependencies
This marks an important step towards delivering OpenXLA, Google’s OSS-based unified ML software infrastructure.

PiperOrigin-RevId: 563177047
2023-09-06 12:12:29 -07:00
David Dunleavy 46432b76b7 Fix Copybara issue inside nccl build file
PiperOrigin-RevId: 545819199
2023-07-05 16:45:21 -07:00
Nathan Luehr 19b7519c2e PR #59825: Get CUDA dependencies from PyPI packages
Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/59825

This PR is a POC demonstrating building TensorFlow so that it depends on NVIDIA's wheel-based library releases for the required CUDA libraries and runtime. Users will still need to install the CUDA driver separately, but all other NVIDIA library dependencies should be fetched automatically by pip.

For example, after building the wheel with the usual OSS build scripts (based on cuda 11.8), the resulting wheel could be installed in a fairly minimalist ubuntu 20.04 environment as follows:

```
docker run --rm -it --gpus all -v /path/to/tensorflow/pkg:/tf/pkg nvidia/cuda:12.0.1-base-ubuntu20.04
apt update && apt install -y --no-install-recommends curl python3 python3-pip
python3 -mpip install --upgrade pip
pip3 install /tf/pkg/tensorflow-*.whl
```

Notice that the CUDA driver's forward compatibility allows users to use the latest (here CUDA 12) base container/driver, while pip pulls in the necessary CUDA 11.8-based libraries as needed.

Currently, NVIDIA wheels are released only for linux platforms and the x86_64 architecture.
Copybara import of the project:

--
ff44df38cd6514f72a01de418003994d39f43e30 by Nathan Luehr <nluehr@nvidia.com>:

Depend on nvidia-pyindex packages

--
87bf0f71d4c806dc1fa65bb95b71d69d9299aa97 by Trevor Morris <tmorris@nvidia.com>:

Fix rpath to standalone nccl

While libtensorflow_cc.so has all of the rpaths to the nvidia standalone
libraries, _pywrap_tensorflow_internal.so only has those from the dependencies
listed here.

For whatever reason, nccl needs to be in pywrap_tensorflow_internal's rpaths,
so I've added a new dependency on a dummy target which just adds the rpaths.

--
885bd7d31ad0e35814da8f0590a9cf898afdf7f7 by Nathan Luehr <nluehr@nvidia.com>:

Install nv lib wheels based on 'with-cuda' extra dependency.

--
afdb0902f2fb521668e52c0b015a217055e72516 by Nathan Luehr <nluehr@nvidia.com>:

Use 'and-cuda' rather than 'with-cuda' as modifier

--
03262d48daf2fad4f36a013e29a6098aea304a4f by Nathan Luehr <nluehr@nvidia.com>:

Move rpath flag construction into helper function.

--
c915c60d727f84565d846017d22a5cccf4e54ccb by Nathan Luehr <nluehr@nvidia.com>:

Add explanatory comment for nvcc paths.

Merging this change closes #59825

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/tensorflow/pull/59825 from nluehr:nv-wheel-deps c915c60d727f84565d846017d22a5cccf4e54ccb
PiperOrigin-RevId: 544733780
2023-06-30 13:24:18 -07:00
Brian Wieder a70baaefcc Upgrade clang toolchain to use clang-16.
PiperOrigin-RevId: 506381712
2023-02-01 11:56:30 -08:00
Brian Wieder f41b04845c Patch NCCL to remove an invalid constexpr when compiling with clang using C++17.
It has already been reported to the NCCL Repo: https://github.com/NVIDIA/nccl/issues/759

PiperOrigin-RevId: 503937356
2023-01-23 03:16:24 -08:00
A. Unique TensorFlower 91baa03cb9 Merged commit includes the following changes:
496953709  by A. Unique TensorFlower<gardener@tensorflow.org>:
496952678  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Fix iOS nightly release build. Add profiler.h in TensorFlowLiteC framework headers.

--
496952616  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Convert _placeholder_value into a public API.

--
496949861  by A. Unique TensorFlower<gardener@tensorflow.org>:

    [XLA] Make HloModuleConfig own the string keys in `analysis_allowance_map_`

    This fixes a use-after-free bug when deserializing an HloModuleConfig:
    https://github.com/tensorflow/tensorflow/blob/f1251be0983f36616bcf6d3fa896d01dcbf82fdb/tensorflow/compiler/xla/service/hlo_module_config.cc#L304-L306

    Without this change, the keys of `analysis_allowance_map_` have the
    same lifetime as the input proto that's being deserialized, which is
    probably very inconvenient semantics for the caller. In practice there
    are not many keys and they're short, so I don't think the extra string
    copy will have a noticeable performance impact.

--
496949804  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Update the JAX's docker image to base it on the new image that TF has.

--
496947227  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Remove unused imports.

--
496944423  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Bypass nvprune if compiling with CUDA Clang. Retry

--
496941078  by A. Unique TensorFlower<gardener@tensorflow.org>:
496940772  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Add `ParseFromString` method to `OpSharding` Python bindings.

--
496940632  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Remove PAT from Scorecards workflow

    This should make the workflow work again. Will test after this lands.

    Signed-off-by: Mihai Maruseac <mihaimaruseac@google.com>

--
496939937  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Automated visibility attribute cleanup.

--
496939490  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Remove all PTX except for the specified one.

--
496931612  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Integrate StableHLO at openxla/stablehlo@e8c1c04

--
496919498  by A. Unique TensorFlower<gardener@tensorflow.org>:

    [JITRT] Add a regression_test for broadcasting.

    This is a reduced version of broadcasting_2, which is much easier to
    read/debug.

--
496918085  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Add RBE to linux builds to improve test times.

--
496914744  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Add serialization support to FeatureSpace.

--
496911817  by A. Unique TensorFlower<gardener@tensorflow.org>:

    [IFRT] Remove BUILD file tests for IFRT, which is always enabled now.

--
496911684  by A. Unique TensorFlower<gardener@tensorflow.org>:

    [GmlSt] Implement `reifyResultShapes` for `gml_st.materialize`.

--
496906503  by A. Unique TensorFlower<gardener@tensorflow.org>:

    PR #58850: Update compat.py

    Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/58850

    Fixed the broken link of tf.compat.forward_compatible.
    Copybara import of the project:

    --
    4589648939 by Tirumalesh <111861663+tiruk007@users.noreply.github.com>:

    Update compat.py

    Fixed the broken link of (tf.compat.forward_compatible)[https://www.tensorflow.org/api_docs/python/tf/compat/forward_compatible]

    Merging this change closes #58850

--
496904759  by A. Unique TensorFlower<gardener@tensorflow.org>:
496895256  by A. Unique TensorFlower<gardener@tensorflow.org>:

    [DelegatePerformance] Split the targets out into subpackages.

--
496893002  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Remove unused `tf-jitrt-symbolic-shape-optimization` pass

--
496887677  by A. Unique TensorFlower<gardener@tensorflow.org>:

    [GmlSt] Tile map and fill ops again in a peeled loop for scalarization.

    The perfectly-tiled part of the loop remains unchanged and will be vectorized. Ops in the peeled loop should be scalarized later.

--
496885897  by A. Unique TensorFlower<gardener@tensorflow.org>:

    [MLIR:XLA] Move shape.bcast simplification into the MHLO's shape optimization pass

    Also, remove the old shape optimization pass from the pipeline.

--
496880934  by A. Unique TensorFlower<gardener@tensorflow.org>:

    [DelegatePerformance] Handle failures from parsing latency results.

--
496878266  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Internal fixes.

--
496866713  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Add failing tests for XlaCallModule.

    The newly added tests are failing at the moment and are disabled.
    Added here to help debugging.

--
496864860  by A. Unique TensorFlower<gardener@tensorflow.org>:

    [XLA:GPU] [NFC] Remove unused function

--
496859249  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Cleaning up BUILD files to remove "loose" headers.

--

PiperOrigin-RevId: 496953709
2022-12-21 18:36:53 +00:00
Nitin Srinivasan a4a3b88b47 Bypass nvprune if compiling with CUDA Clang.
PiperOrigin-RevId: 496778650
2022-12-20 16:28:40 -08:00
Juan Martinez Castellanos 43a4cc8f21 Bypass nvprune if compiling with CUDA Clang.
PiperOrigin-RevId: 496729089
2022-12-20 13:09:52 -08:00
Brian Wieder f89b506ef6 Remove selects for MacOS in NCCL since CUDA is no longer supported on MacOS.
PiperOrigin-RevId: 496642427
2022-12-20 06:18:53 -08:00
Brian Wieder 64b1ccfb4f Use cuda_library when compiling NCCL enqueue.cc with cuda clang, else, use cc_library for NVCC.
PiperOrigin-RevId: 496401698
2022-12-19 08:10:54 -08:00
Jake Harmon bab22fd25c Replace TF configs in third_party with TSL configs
PiperOrigin-RevId: 495200838
2022-12-13 20:53:49 -08:00
A. Unique TensorFlower e0032f9d64 Update to NCCL 2.13.4
PiperOrigin-RevId: 463954984
2022-07-28 16:40:54 -07:00
A. Unique TensorFlower ea340fa601 Build NCCL with cc compiler instead of nvcc (where possible)
PiperOrigin-RevId: 456862566
2022-06-23 14:34:37 -07:00
A. Unique TensorFlower bedf87bc42 Update NCCL 2.8.3-1 to 2.12.12-1
PiperOrigin-RevId: 455721890
2022-06-17 16:56:28 -07:00
Alexander Grund 7268be538d Add use_default_shell_env to ctx.actions.run 2021-08-30 11:24:36 +02:00
Alexander Grund 6a23f007b8 Add use_default_shell_env = True to all ctx.actions.run_shell rules
To compile flatbuffers definition Bazel starts the  flatbuffers compiler
flatc which is potentially built using a custom
toolchain and hence requires a set up LD_LIBRARY_PATH.
Ommitting the `use_default_shell_env` (defaulting to false) clears the
whole environment and the binary may try to use older system libs such
as /lib64/libstdc++.so causing it to fail in case it is (much) older
than the used libstdc++ from the custom toolchain which is very common
in HPC environments.
Hence I added `use_default_shell_env = True` as already done in e.g.
`_local_genrule_impl`.
2021-08-30 11:24:01 +02:00