Commit Graph

497 Commits

Author SHA1 Message Date
Vadym Matsishevskyi
641de23853 Fix windows-specific issues for pywrap rules
PiperOrigin-RevId: 694978320
2024-11-09 21:31:30 -08:00
A. Unique TensorFlower
6be047c796 Rollback of PR #76831
Roll back https://github.com/tensorflow/tensorflow/pull/76831 because it broke `--config=linux_arm64_pycpp_test` with `--test_env=TF_ENABLE_ONEDNN_OPTS=1`.

There are many places where `-fopenmp` is still appended for aarch64 config, e.g. [1](ca3fc6a119/xla/tsl/tsl.bzl (L352)), [2](ca3fc6a119/xla/tsl/tsl.bzl (L352))

Reverts 805ae2c264

PiperOrigin-RevId: 690760453
2024-10-28 15:02:31 -07:00
TensorFlower Gardener
805ae2c264 Merge pull request #76831 from snadampal:compute_library_def_runtime_fix
PiperOrigin-RevId: 690199035
2024-10-26 17:26:30 -07:00
A. Unique TensorFlower
14fe7ddb7d Add TF wheel API Bazel test for Linux and MacOS platforms.
PiperOrigin-RevId: 689025141
2024-10-23 11:48:35 -07:00
Sunita Nadampalli
89bb98e2bc aarch64: disable openmp runtime in Arm Compute library for threadpool build 2024-10-22 22:14:44 +00:00
A. Unique TensorFlower
82d1840d20 Move wheel_dependency flag to TSL repository.
PiperOrigin-RevId: 688223277
2024-10-21 12:11:27 -07:00
A. Unique TensorFlower
7ba00ec863 Fix import_api_packages_test for the cases when WHEEL_NAME is passed to Bazel options.
Add `--@xla//xla/tsl:wheel_dependency=true` flag to wheel tests.

PiperOrigin-RevId: 684610277
2024-10-10 16:22:54 -07:00
A. Unique TensorFlower
cdf0d2dd49 Rename nvcc_clang to cuda_nvcc according to the changes in JAX
Rename `nvcc_clang` to `cuda_nvcc` according to the changes in JAX
Fix "Line too long" error in xla/.../configure.py issued by PyLint

PiperOrigin-RevId: 681940132
2024-10-03 10:57:50 -07:00
tchatow
3f4b2fda6f PR #16882: Symlink hermetic cuda headers to permit clang cuda version detection
Imported from GitHub PR https://github.com/openxla/xla/pull/16882

Fixes #16877
Copybara import of the project:

--
1ff356ac0870002b369c3ec09547aae2a62c70e2 by tchatow <tchatow@users.noreply.github.com>:

Symlink hermetic cuda headers to permit clang cuda version detection

Fixes #16877

Merging this change closes #16882

PiperOrigin-RevId: 679764212
2024-09-27 16:30:47 -07:00
A. Unique TensorFlower
ee313c5f35 Remove -Wno-error=unused-but-set-variable from .bazelrc
This flag is no longer available since clang 10.0.0.

PiperOrigin-RevId: 679177375
2024-09-26 09:28:12 -07:00
A. Unique TensorFlower
55b572cbdb Remove --@xla//xla/tsl:wheel_dependency=true to fix nightlies CI.
PiperOrigin-RevId: 677017563
2024-09-20 17:02:01 -07:00
A. Unique TensorFlower
0546d214f9 Fix wheel_test configurations.
PiperOrigin-RevId: 676939344
2024-09-20 12:56:29 -07:00
A. Unique TensorFlower
55ca3b150c Add TF wheel API test.
This test verifies whether the API v2 packages can be imported from the
current build. It utilizes the `_api/v2/api_packages.txt` list of packages from
the local wheel file specified in the `requirements_lock_<python_version>.txt`.

The test should be executed after the TF wheel was built and put into `dist` dir inside Tensorflow repository.

PiperOrigin-RevId: 676893008
2024-09-20 10:43:17 -07:00
Vladimir Belitskiy
9b4fae4332 Disable xnn_enable_avxvnniint8 for Android.
This is only supported on the very latest compilers at the moment.

PiperOrigin-RevId: 676469843
2024-09-19 10:49:43 -07:00
Thomas Köppe
58374ae498 Remove obsolete op registrations from c_api_no_xla.
PiperOrigin-RevId: 675958129
2024-09-18 06:07:16 -07:00
A. Unique TensorFlower
b26c4dff6e Update cuda_clang_official config with CUDA 12.5.1.
PiperOrigin-RevId: 675148340
2024-09-16 08:06:37 -07:00
Henning Becker
6411af23a9 Update default CUDA Toolkit version to 12.5.1
This updates CUDA for both TF and XLA. It also enables the CUDA driver forward
compatibility mode for XLA since XLA's CUDA graph integration needs a newer
driver version.

PiperOrigin-RevId: 673974335
2024-09-12 13:18:54 -07:00
A. Unique TensorFlower
f7c0688e34 Delete remote tensorrt repository rule calls from TF configs.
Starting from v.2.18.0, TensorFlow doesn't support TensorRT.

PiperOrigin-RevId: 673440422
2024-09-11 10:24:08 -07:00
Kanglan Tang
5fb6e85f96 Remove unsupported_*_linux configs from .bazelrc as planned
These configs are no longer needed as the old GCC toolchain is no longer supported.

If you still need these configs, add them to a user-specific bazelrc file for your project. Refer to the Bazel documentation https://bazel.build/run/bazelrc for more guidance.

PiperOrigin-RevId: 673047905
2024-09-10 12:22:40 -07:00
A. Unique TensorFlower
55de680725 Delete remote python repository rule calls from TF configs.
Remote configurations of python repositories are removed because hermetic Python repository rules install and configure python modules in Bazel cache on the host machine. The cache is shared across host and remote machines.

PiperOrigin-RevId: 671512134
2024-09-05 14:39:55 -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
00cc85e759 Exclude CUDA dependencies from libtensorflow build.
PiperOrigin-RevId: 668435722
2024-08-28 07:29:20 -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
Henning Becker
510dc6fe76 Update cuDNN to version 9.3.0 in TF's and XLA's CI
Due to the amazing hermetic CUDA change this is now just a
one line change and all tests automatically run as presubmits.

PiperOrigin-RevId: 666780598
2024-08-23 07:18:02 -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
caa2b33e73 Disable TensorRT in TF, XLA and JAX.
This is needed for hermetic CUDA integration in Google ML projects since tensorRT is not distributed in the same free way as other CUDA/CUDNN distributives.

PiperOrigin-RevId: 662601190
2024-08-13 12:17:00 -07:00
A. Unique TensorFlower
96eef05d59 Reverts 2a0d14de06
PiperOrigin-RevId: 661349081
2024-08-09 12:47:16 -07:00
Nitin Srinivasan
2a0d14de06 Remove --flaky_test_attempts from Linux Arm64 presubmit/continuous test filters
We want to use this flag only in the release/nightly wheel builds

PiperOrigin-RevId: 660929972
2024-08-08 12:37:15 -07:00
Vladimir Belitskiy
7f03e159cd Set up a new Windows presubmit, and have it use the pycpp.sh script.
PiperOrigin-RevId: 660554802
2024-08-07 16:01:25 -07:00
Eugene Zhulenev
8bfd1d69fa [xla:cpu] Optimize ThunkExecutor::Execute part #2
Use std::aligned_storage_t trick to avoid default-initializing Node struct on a hot path.

name                                     old cpu/op   new cpu/op   delta
BM_SelectAndScatterF32/128/process_time   791µs ± 4%   720µs ± 2%  -8.93%
BM_SelectAndScatterF32/256/process_time  3.20ms ± 4%  2.96ms ± 2%  -7.46%
BM_SelectAndScatterF32/512/process_time  13.7ms ± 5%  12.8ms ± 2%  -6.80%

name                                     old time/op          new time/op          delta
BM_SelectAndScatterF32/128/process_time   790µs ± 5%           719µs ± 1%   -9.00%
BM_SelectAndScatterF32/256/process_time  3.20ms ± 3%          2.96ms ± 1%   -7.58%
BM_SelectAndScatterF32/512/process_time  13.2ms ± 4%          12.3ms ± 1%   -6.82%

PiperOrigin-RevId: 658139935
2024-07-31 14:59:06 -07:00
David Dunleavy
5d8e3738d0 Remove unused aws_support and hdfs_support configs
PiperOrigin-RevId: 655272587
2024-07-23 13:48:57 -07:00
David Dunleavy
e7c17d6fbf Delete unused //tensorflow/python/integration_testing/... and all users
PiperOrigin-RevId: 651843853
2024-07-12 13:16:57 -07:00
Michael Hudgins
a79c87342c Upgrade to support and default to clang 18 for the OSS compiler
PiperOrigin-RevId: 651080905
2024-07-10 11:56:24 -07:00
David Dunleavy
8a69fee806 Add bazelrc change that should've gone in with https://github.com/openxla/xla/pull/13408
This change fixes mlir_hlo tests on Windows

PiperOrigin-RevId: 642299075
2024-06-11 10:12:54 -07:00
Nitin Srinivasan
43eb24b614 Disable BES uploads and set BEP uploads to minimal for Mac RBE cross-compile builds
PiperOrigin-RevId: 630135925
2024-05-02 12:34:20 -07:00
Nitin Srinivasan
96959d2a0d Add --remote_download_minimal to RBE cross-compile Mac config
Fixes https://github.com/bazelbuild/bazel/issues/21568

PiperOrigin-RevId: 629519684
2024-04-30 14:10:14 -07:00
A. Unique TensorFlower
36304aadbd Add RBE toolchains for Clang on Windows.
PiperOrigin-RevId: 627830607
2024-04-24 13:50:35 -07:00
mraunak
5904f2db12 PR #11299: [XLA:CPU] Enable XLA on Windows
Imported from GitHub PR https://github.com/openxla/xla/pull/11299

This PR aims to enable the XLA test cases on the Windows Platform. The changes made:

1. Changed the .bazelrc file to use the correct toolchain and platform
This change will allow the user to successfully run XLA tests on the Windows platform using the Clang compiler using '--config=win_clang' in the bazel command

2. Added conditions to a few test cases to successfully run on the Windows platform
These test cases check the exit/termination status of a process
WIFEXITED is typically supported in POSIX-compliant operating systems like Unix and Linux to check if a process has terminated normally. WEXITSTATUS allows examining the termination status of child processes. However, these macros are not Windows compliant, hence the additional condition block was added to check the exit/termination status of process or child process for the Windows platform
Copybara import of the project:

--
ece9eefa224a6d051bcac089fe2a9a393af16a2b by Raunak <mayank.kumar.raunak@intel.com>:

Enable XLA Windows

--
347c0326af8f608047f06345cad4dfbb53a52150 by mraunak <83710963+mraunak@users.noreply.github.com>:

Update interactive_graphviz_bin_test.cc
--
2d4a3c2bb2ea23f12029583c53087d8739da0319 by mraunak <83710963+mraunak@users.noreply.github.com>:

Update xla/tools/interactive_graphviz_bin_test.cc

Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com>
--
90ad8b2730900d7f82b0fb1a83a73ffa2e452e0e by mraunak <83710963+mraunak@users.noreply.github.com>:

Update run_hlo_module_bin_test.cc
--
7f31412f6b57e53bd56ba92149b015fcba92b07c by mraunak <83710963+mraunak@users.noreply.github.com>:

Update xla/tools/run_hlo_module_bin_test.cc

Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com>
--
4d39e35461f6977f36404a435c68b4809fb51a44 by mraunak <83710963+mraunak@users.noreply.github.com>:

Update hlo_expand_test.cc
--
816b9ae0498831b55139c72d627d07f05e51213b by mraunak <83710963+mraunak@users.noreply.github.com>:

Update hlo_expand_test.cc
--
a728fff1aca4258602c3d7c78afcc7d38b545b7a by mraunak <83710963+mraunak@users.noreply.github.com>:

Update hlo_expand_test.cc
--
ffcb6861becf8de7a5c4e64ef0f19d977475d281 by mraunak <83710963+mraunak@users.noreply.github.com>:

Update interactive_graphviz_bin_test.cc
--
f181497793c2c48079d72b545e6efb837f490504 by mraunak <83710963+mraunak@users.noreply.github.com>:

Update interactive_graphviz_bin_test.cc
--
f9af75677e4663b3348e9e89376262eaff389ea9 by mraunak <83710963+mraunak@users.noreply.github.com>:

Update run_hlo_module_bin_test.cc

Merging this change closes #11299

PiperOrigin-RevId: 627216606
2024-04-22 18:21:54 -07:00
Yang Sheng
8db95db399 Add sycl build target #10244
PiperOrigin-RevId: 623599115
2024-04-10 14:49:38 -07:00
A. Unique TensorFlower
87a99438f8 Create and use 2.17 toolchains in Docker build containers.
PiperOrigin-RevId: 623491147
2024-04-10 08:40:34 -07:00
Jake Harmon
41bfc5d180 Set release_base for all release platforms
PiperOrigin-RevId: 620111958
2024-03-28 18:37:22 -07:00
David Dunleavy
aed79b8b9a Generate XLA's warnings.bazelrc automatically by inspecting the toolchain
PiperOrigin-RevId: 619326423
2024-03-26 16:27:38 -07:00
David Dunleavy
5a6898987e Enable more warnings for XLA
PiperOrigin-RevId: 618259828
2024-03-22 13:10:22 -07:00
Quoc Truong
727affbef5 Add support for cross-compilation build for Linux XLA ARM64 build. The current bazel config does not work out of the box for the XLA repository because of some path differences. Additionally, the build needs to be generated with Standalone Genrule strategy because the XLA build does not use hermetic Python.
PiperOrigin-RevId: 613373529
2024-03-06 16:35:18 -08:00
TensorFlower Gardener
39abfdc1af Merge pull request #60161 from RoboTux:fix_building_for_host_arch
PiperOrigin-RevId: 611657552
2024-02-29 18:13:40 -08:00
A. Unique TensorFlower
c71bcf6fe2 Add support for sm_89 and remove support for sm_50 compute capability
We expect a noticable performance improvement on NVIDIA GPUs that support
sm_89 (NVIDIA L4 and L40) over just providing sm_80 (which is compatible).

To avoid an increase in package size we remove support for the oldest generation of GPUs (sm_50). The last GPU that does not support
sm_60 was released in early 2016 (8 years ago) and it's a laptop GPU.
The last desktop GPU without sm_60 support was released in in early 2015 (9 years ago).

PiperOrigin-RevId: 610648659
2024-02-26 23:50:04 -08:00
Nitin Srinivasan
c5adaecd9b Change bes_upload_mode to nowait_for_upload_complete for the cross-compile macOS build
`fully_async` lets Bazel upload the build event in background and does not prematurely mark the build as failed in case it is taking longer than the value in `--bes_timeout`. However, BES uploads are sometimes taking a very long time (>5hrs) to finish. Having test results show up in result store would be nice but since it is not a priority for these builds right now, we can disable BES upload when cross-compiling for macOS.

PiperOrigin-RevId: 608994569
2024-02-21 08:10:00 -08:00
Nitin Srinivasan
5adeb8894a Fix typo in config name
Only macOS RBE configs need bes upload mode to be set to fully async

PiperOrigin-RevId: 607511822
2024-02-15 17:50:07 -08:00
Nitin Srinivasan
684cfabcff Change bes_upload_mode to fully async for macOS RBE build
The experimental cross-compile build fail sometimes because build event protocol upload for these builds is flaky and sometimes timeout. This is causing the job (even if `bazel build` ran successfully) to reported as failed. By changing it to full async, Bazel uploads BES asynchronously so it can exit and the upload still continues in the background.

PiperOrigin-RevId: 607416907
2024-02-15 12:31:00 -08:00
Nitin Srinivasan
26c102c580 Make the experimental macOS cross-compile build to be "build-only"
PiperOrigin-RevId: 606757596
2024-02-13 15:15:52 -08:00