Fixes https://github.com/pytorch/pytorch/issues/77509
This PR supersedes https://github.com/pytorch/pytorch/pull/77510.
It allows both `bazel query //...` and `bazel build --config=gpu //...` to work.
Concretely the changes are:
1. Add "GenerateAten" mnemonic -- this is a convenience thing, so anybody who uses [Remote Execution](https://bazel.build/docs/remote-execution) can add a
```
build:rbe --strategy=GenerateAten=sandboxed,local
```
line to the `~/.bazelrc` and build this action locally (it doesn't have hermetic dependencies at the moment).
2. Replaced few `http_archive` repos by the proper existing submodules to avoid code drift.
3. Updated `pybind11_bazel` and added `python_version="3"` to `python_configure`. This prevents hard-to-debug error that are caused by an attempt to build with python2 on the systems where it's a default python (Ubuntu 18.04 for example).
4. Added `unused_` repos, they purpose is to hide the unwanted submodules of submodules that often have bazel targets in them.
5. Updated CI to build //... -- this is a great step forward to prevent regressions in targets not only in the top-level BUILD.bazel file, but in other folders too.
6. Switch default bazel build to use gpu support.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78870
Approved by: https://github.com/ezyang
Summary:
This diff moved the XNNPACK buck build to a shared build file in xplat/caffe2/third_party, so it can be reused by OSS buck CI in the future. There's no functionality change.
**Background**: as we are moving to github-first, we want community to receive more signals from our internal build. XNNPACK is part of pytorch mobile build so we want to add it to OSS BUCK CI.
**How it works**: all XNNPACK targets are defined in xplat/caffe2/third_party/xnnpack_defs.bzl. When we build it internally, the XNNPACK source is still at xplat/third-party/XNNPACK and we will load that bzl file in xplat/third-party/XNNPACK/BUCK. Everything should work as before. In OSS build, XNNPACK is a submodule in xplat/caffe2/third_party and we will load the same bzl file in pytorch/third_party/BUILD.buck.
**Wrapper Generation**: the wrapper generation script is moved to xplat/caffe2/third_party/generate-xnnpack-wrappers.py. It will take an optional argument for the path of XNNPACK (they are different in internal build and OSS build). The wrapper files will always be generated at the parent folder of XNNPACK source. But the src_defs.bzl and wrapper_defs.bzl will always be in xplat/caffe2/third_party/ (they are now called xnnpack_src_defs.bzl and xnnpack_wrapper_defs.bzl). For OSS build this script will only be used in CI, and the generated files will not be committed.
**Next Steps:** Once landed, I will try to build XNNPACK in OSS BUCK using xnnpack_defs.bzl. Meta-specific symbols need to be resolved, so there will be some refactors to the build file.
Test Plan: buck build xplat/third-party/XNNPACK:XNNPACK
Differential Revision: D36529332
Pull Request resolved: https://github.com/pytorch/pytorch/pull/77941
Approved by: https://github.com/malfet, https://github.com/seemethere
This functionality does not seem to be used
and there are some requests to update dependency.
Add `third_party` to torch_cpu include directories if compiling with
Caffe2 support, as `caffe2/quantization/server/conv_dnnlowp_op.cc` depends on `third_party/fbgemm/src/RefImplementations.h`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75394
Approved by: https://github.com/janeyx99, https://github.com/seemethere
Summary:
This PR upgrades oneDNN to v2.6.0.
v2.6.0 changes:
- Improved performance for future Intel Xeon® Scalable processors (code name Sapphire Rapids). The functionality requires Linux kernel 5.16 or later.
- Improved performance of matmul primitive for processors with Intel AVX-512 support.
- Introduced bfloat16 destination support for int8 convolution, matmul and inner product primitives for processors with Intel AVX-512 support and or future Intel Xeon® Scalable processors (code name Sapphire Rapids)
- Extended RNN primitive with support for [AUGRU cell](https://oneapi-src.github.io/oneDNN/dev_guide_rnn.html#augru).
- Added support for non-zero negative slope in ReLU post-op for batch normalization primitive.
- Introduced support for mixed source and destination data types in softmax primitive.
- Introduced [persistent cache API](https://oneapi-src.github.io/oneDNN/dev_guide_persistent_cache.html). This functionality allows to serialize and reuse JIT kernels.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75398
Reviewed By: dagitses, bigfootjon
Differential Revision: D35976827
Pulled By: frank-wei
fbshipit-source-id: a77ae15cd77fc7c114ab9722453c28dc64aac679
(cherry picked from commit e376698d3c772aaa2dfbe51a4d1a75c8d17d0eee)
This script was hanging up on a couple of licenses not being parsed
correctly / not accounted for in the original pass through
Should resolve issues with tests not running 100% correctly
Signed-off-by: Eli Uriegas <eliuriegasfb.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/76336
Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
Approved by: https://github.com/ezyang
Summary:
This is an automated pull request to update the first-party submodule for [pytorch/FBGEMM](https://github.com/pytorch/FBGEMM).
New submodule commit: ef22aabc8b
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74633
Test Plan: Ensure that CI jobs succeed on GitHub before landing.
Reviewed By: jianyuh
Differential Revision: D35088395
Pulled By: geyyer
fbshipit-source-id: cb6808719a545c318302ed2770b3c7fa459fe169
(cherry picked from commit dfba6a9441136ff8563e80e6a09c555ad6a3af5a)
Summary:
This is an automated pull request to update the first-party submodule for [pytorch/FBGEMM](https://github.com/pytorch/FBGEMM).
New submodule commit: d7bc9d8f4a
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74447
Test Plan: Ensure that CI jobs succeed on GitHub before landing.
Reviewed By: jspark1105
Differential Revision: D35002422
fbshipit-source-id: 5376d122d1af0b4ee99ff692fe91983273eb4e61
(cherry picked from commit 95650ebd1904f0131685c689b348bf76fa614781)
Summary:
This is an automated pull request to update the first-party submodule for [pytorch/FBGEMM](https://github.com/pytorch/FBGEMM).
New submodule commit: 43c0f12abd
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74423
Test Plan: Ensure that CI jobs succeed on GitHub before landing.
Reviewed By: jspark1105
Differential Revision: D34993535
fbshipit-source-id: c40e2100810b40b58a2b3f536e5b132fc4b8acae
(cherry picked from commit 65e17825f4ce975417afbc26833d20eaac25ea8f)
Summary:
This is an automated pull request to update the first-party submodule for [pytorch/FBGEMM](https://github.com/pytorch/FBGEMM).
New submodule commit: ecc98a9d3e
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74409
Test Plan: Ensure that CI jobs succeed on GitHub before landing.
Reviewed By: jspark1105
Differential Revision: D34984886
fbshipit-source-id: 6992460919800ff5e17b373d348d40932fb1dcb7
(cherry picked from commit 55648f01b230e69158e0aab216311e2a9393a8f0)
Summary:
This is an automated pull request to update the first-party submodule for [pytorch/FBGEMM](https://github.com/pytorch/FBGEMM).
New submodule commit: bedfcaeea2
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74369
Test Plan: Ensure that CI jobs succeed on GitHub before landing.
Reviewed By: malfet
Differential Revision: D34957139
fbshipit-source-id: 67672c6f10bb0f6edc48e4c3b926e356313c98f7
(cherry picked from commit de2fadf31cc0186214ff1dd99cfb1c15fedc8ecd)
Summary:
This is an automated pull request to update the first-party submodule for [pytorch/FBGEMM](https://github.com/pytorch/FBGEMM).
New submodule commit: 43d47445d6
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74104
Test Plan: Ensure that CI jobs succeed on GitHub before landing.
Reviewed By: jasonjk-park, jianyuh
Differential Revision: D34822662
fbshipit-source-id: 18d76c84b8353c8e5c306487cac43e742ace2634
(cherry picked from commit 34a88f94b3b5690f46b8ba7bd9745e9260847941)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73858
The newer version of Kineto has changes to handle generic activities (such as RocTracer generic activities), so we can remove the older USE_KINETO_UPDATED macro and implementation of flow.linkedActivity.
This patch should bring Kineto back in sync on PyTorch CI.
Test Plan: PyTorch OSS CI needs to pass for this submodule update of third_party/kineto repo. With ciflow/cuda enabled.
Reviewed By: chaekit
Differential Revision: D34689078
Pulled By: aaronenyeshi
fbshipit-source-id: 305431cbce95ecd57c23b0485e4bb921ea2c7c0a
(cherry picked from commit aef46a287f4cee92ab96650b6a0ab81648bca374)
Summary:
This is an automated pull request to update the first-party submodule for [pytorch/FBGEMM](https://github.com/pytorch/FBGEMM).
New submodule commit: b4ba8d1368
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74088
Test Plan: Ensure that CI jobs succeed on GitHub before landing.
Reviewed By: jspark1105
Differential Revision: D34811416
fbshipit-source-id: 7c47df1f56c43d5b611f2f18cc98c3e669470b75
(cherry picked from commit 9614bb863dc9b4f0e95aa48a50fd214e70c13817)
Summary:
This is an automated pull request to update the first-party submodule for [pytorch/FBGEMM](https://github.com/pytorch/FBGEMM).
New submodule commit: 814ec8cd84
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73895
Test Plan: Ensure that CI jobs succeed on GitHub before landing.
Reviewed By: jspark1105
Differential Revision: D34705004
fbshipit-source-id: 09918b633bbb950a747d806d9efc26717917a811
(cherry picked from commit 750ac00ef6369a246235209697b458d80da9cd46)
Summary:
The newer version of Kineto has changes to handle generic activities (such as RocTracer generic activities), so we can remove the older USE_KINETO_UPDATED macro and implementation of flow.linkedActivity.
This patch should bring Kineto back in sync on PyTorch CI.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73090
Test Plan: PyTorch OSS CI needs to pass for this submodule update of third_party/kineto repo.
Pulled By:
aaronenyeshi
aaronenyeshi
Reviewed By: briancoutinho
Differential Revision: D34230284
fbshipit-source-id: cbecaf79e51ad4b6d9cda9e855d839792a1c184b
(cherry picked from commit 2242352edd8bbb8962deca4077b7622418aad50b)
Summary:
This is an automated pull request to update the first-party submodule for [pytorch/FBGEMM](https://github.com/pytorch/FBGEMM).
New submodule commit: 9f2271be0d
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73814
Test Plan: Ensure that CI jobs succeed on GitHub before landing.
Reviewed By: jspark1105
Differential Revision: D34658981
fbshipit-source-id: a7f119ce6b0446803f0cf1f4d0518b95319a3696
(cherry picked from commit 7e1b11cb170e508d892cb88c9b87069063b2f797)
Summary:
This is an automated pull request to update the first-party submodule for [pytorch/FBGEMM](https://github.com/pytorch/FBGEMM).
New submodule commit: d791702c9d
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73277
Test Plan: Ensure that CI jobs succeed on GitHub before landing.
Reviewed By: jasonjk-park
Differential Revision: D34411702
fbshipit-source-id: 0fe15a0549f7c30bcf61712353cc7b2089ead0ee
(cherry picked from commit f75e143bda8cf96122f921c67f9d0e9aa345a149)
Summary:
Original commit changeset: f5a792555c88
Original Phabricator Diff: D34398107 (d00de0d435)
Backing out as this broke fluent2 tests
Test Plan: sandcastle
Reviewed By: qihqi
Differential Revision: D34597363
fbshipit-source-id: 26bbe64b981aeb53b901cda61557614d9f28700e
(cherry picked from commit f17adfed8125ef84efaf2c8923c11a751eb7fb98)
Summary:
https://github.com/pytorch/pytorch/issues/58414, https://github.com/pytorch/pytorch/issues/58859, https://github.com/pytorch/pytorch/issues/58858#58860https://github.com/pytorch/pytorch/issues/58861
We're currently testing performance with both "find" and "get" with this PR.
CC zasdfgbnm ptrblck ngimel puririshi98
In addition to the `USE_EXPERIMENTAL_CUDNN_V8_API` build flag, we've added a `CUDNN_V8_API_ENABLED` runtime feature flag.
`USE_EXPERIMENTAL_CUDNN_V8_API=1` will build with v8 API support while keeping all v7 functionality, with v8 usage disabled by default.
`CUDNN_V8_API_ENABLED=1` at runtime on a `USE_EXPERIMENTAL_CUDNN_V8_API=1` build uses the v8 API.
A debug flag `CUDNN_V8_API_DEBUG=1` can be used to verify which API is used when dispatching convolutions.
Note that in v7, `bfloat16` convolutions will dispatch to a native PyTorch implementation, but a fully v8 enabled build will dispatch to cuDNN implementations.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/60755
Reviewed By: mruberry
Differential Revision: D34393940
Pulled By: ngimel
fbshipit-source-id: 5c317d3aad63336ea416a51a43cf8b7d27aaca21
(cherry picked from commit 3bfc549ce57cee691f83dc894ac7adb4b7882459)