8000 Update on "move fbcode ATEN_CORE_H to shared build structure" · pytorch/pytorch@0dc7d07 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0dc7d07

Browse files
author
Michael Andreas Dagitses
committed
Update on "move fbcode ATEN_CORE_H to shared build structure"
We're about to start using this in Bazel. Differential Revision: [D36521516](https://our.internmc.facebook.com/intern/diff/D36521516/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D36521516/)! [ghstack-poisoned]
2 parents d8703b7 + 91f795c commit 0dc7d07

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1579
-1332
lines changed

.circleci/docker/build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,13 @@ case "$image" in
176176
DB=yes
177177
VISION=yes
178178
;;
179+
pytorch-linux-focal-py3-clang10-onnx)
180+
ANACONDA_PYTHON_VERSION=3.7
181+
CLANG_VERSION=10
182+
PROTOBUF=yes
183+
DB=yes
184+
VISION=yes
185+
;;
179186
pytorch-linux-xenial-py3-clang5-android-ndk-r19c)
180187
ANACONDA_PYTHON_VERSION=3.7
181188
CLANG_VERSION=5.0

.circleci/docker/common/install_base.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ install_ubuntu() {
2424
fi
2525

2626
if [[ "$CLANG_VERSION" == 12 ]]; then
27-
libomp_dev="libomp-12-dev"
27+
maybe_libomp_dev="libomp-12-dev"
28+
elif [[ "$CLANG_VERSION" == 10 ]]; then
29+
maybe_libomp_dev="libomp-10-dev"
2830
else
29-
libomp_dev=""
31+
maybe_libomp_dev=""
3032
fi
3133

3234
# TODO: Remove this once nvidia package repos are back online
@@ -60,7 +62,7 @@ install_ubuntu() {
6062
libjpeg-dev \
6163
libasound2-dev \
6264
libsndfile-dev \
63-
${libomp_dev} \
65+
${maybe_libomp_dev} \
6466
software-properties-common \
6567
wget \
6668
sudo \

.circleci/scripts/binary_windows_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ mkdir -p "$PYTORCH_FINAL_PACKAGE_DIR"
66

77
export CUDA_VERSION="${DESIRED_CUDA/cu/}"
88
export USE_SCCACHE=1
9-
export SCCACHE_BUCKET=ossci-compiler-cache-windows
9+
export SCCACHE_BUCKET=ossci-compiler-cache
1010
export SCCACHE_IGNORE_SERVER_IO_ERROR=1
1111
export VC_YEAR=2019
1212

.github/merge_rules.json

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,7 @@
5656
"mandatory_checks_name": [
5757
"Facebook CLA Check",
5858
"Lint",
59-
"linux-docs / build-docs (cpp)",
60-
"linux-docs / build-docs (python)",
61-
"win-vs2019-cpu-py3 / build",
62-
"win-vs2019-cuda11.3-py3 / build",
63-
"linux-bionic-py3.7-clang9 / build",
64-
"linux-xenial-py3.7-clang7-onnx / build",
65-
"linux-xenial-py3.7-clang7-asan / build",
66-
"linux-vulkan-bionic-py3.7-clang9 / build",
67-
"linux-xenial-cuda11.3-py3.7-gcc7 / build",
68-
"linux-bionic-cuda11.3-py3.7-clang9 / build",
69-
"linux-xenial-py3-clang5-mobile-build / build",
70-
"linux-xenial-py3-clang5-mobile-custom-build-static / build",
71-
"pytorch-xla-linux-bionic-py3.7-clang8 / build",
72-
"deploy-linux-xenial-cuda11.3-py3.7-gcc7 / build",
73-
"linux-focal-py3.7-gcc7 / build"
59+
"pull"
7460
]
7561
},
7662
{

.github/scripts/trymerge.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,8 +737,6 @@ def merge_into(self, repo: GitRepo, *, force: bool = False, dry_run: bool = Fals
737737
self.merge_ghstack_into(repo, force, comment_id=comment_id)
738738

739739
repo.push(self.default_branch(), dry_run)
740-
gh_post_pr_comment(self.org, self.project, self.pr_num,
741-
f"@{self.get_pr_creator_login()} your PR has been successfully merged.", dry_run)
742740
if not dry_run:
743741
gh_add_labels(self.org, self.project, self.pr_num, ["merged"])
744742

.github/workflows/_win-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
with:
8888
retention-days: 14
8989
if-no-files-found: error
90-
name: ${{ env.BUILD_ENVIRONMENT }}
90+
name: ${{ inputs.build-environment }}
9191
path: C:\${{ github.run_id }}\build-results
9292

9393
- name: Upload sccache stats

.github/workflows/_win-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: Download PyTorch Build Artifacts
4949
uses: seemethere/download-artifact-s3@v4
5050
with:
51-
name: ${{ env.BUILD_ENVIRONMENT }}
51+
name: ${{ inputs.build-environment }}
5252
path: C:\${{ github.run_id }}\build-results
5353

5454
- name: Check build-results folder

.github/workflows/docker-builds.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
- docker-image-name: pytorch-linux-xenial-py3.7-gcc7
4141
- docker-image-name: pytorch-linux-focal-py3.7-gcc7
4242
- docker-image-name: pytorch-linux-focal-py3-clang7-asan
43+
- docker-image-name: pytorch-linux-focal-py3-clang10-onnx
4344
env:
4445
DOCKER_IMAGE_BASE: 308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/${{ matrix.docker-image-name }}
4546
steps:

.github/workflows/pull.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,20 +93,20 @@ jobs:
9393
]}
9494
9595
96-
linux-xenial-py3_7-clang7-onnx-build:
97-
name: linux-xenial-py3.7-clang7-onnx
96+
linux-focal-py3_7-clang10-onnx-build:
97+
name: linux-focal-py3.7-clang10-onnx
9898
uses: ./.github/workflows/_linux-build.yml
9999
with:
100-
build-environment: linux-xenial-py3.7-clang7-onnx
101-
docker-image-name: pytorch-linux-xenial-py3-clang7-onnx
100+
build-environment: linux-focal-py3.7-clang10-onnx
101+
docker-image-name: pytorch-linux-focal-py3-clang10-onnx
102102

103-
linux-xenial-py3_7-clang7-onnx-test:
104-
name: linux-xenial-py3.7-clang7-onnx
103+
linux-focal-py3_7-clang10-onnx-test:
104+
name: linux-focal-py3.7-clang10-onnx
105105
uses: ./.github/workflows/_linux-test.yml
106-
needs: linux-xenial-py3_7-clang7-onnx-build
106+
needs: linux-focal-py3_7-clang10-onnx-build
107107
with:
108-
build-environment: linux-xenial-py3.7-clang7-onnx
109-
docker-image: ${{ needs.linux-xenial-py3_7-clang7-onnx-build.outputs.docker-image }}
108+
build-environment: linux-focal-py3.7-clang10-onnx
109+
docker-image: ${{ needs.linux-focal-py3_7-clang10-onnx-build.outputs.docker-image }}
110110
test-matrix: |
111111
{ include: [
112112
{ config: "default", shard: 1, num_shards: 2, runner: "linux.2xlarge" },
@@ -209,6 +209,7 @@ jobs:
209209
build-generates-artifacts: false
210210

211211
linux-bionic-py3_7-clang8-xla-build:
212+
if: false
212213
name: linux-bionic-py3_7-clang8-xla
213214
uses: ./.github/workflows/_linux-build.yml
214215
with:

.jenkins/pytorch/common.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ if [[ "${BUILD_ENVIRONMENT}" == *rocm* ]]; then
2222
export HSA_FORCE_FINE_GRAIN_PCIE=1
2323
fi
2424

25-
# This token is used by a parser on Jenkins logs for determining
26-
# if a failure is a legitimate problem, or a problem with the build
27-
# system; to find out more, grep for this string in ossci-job-dsl.
28-
echo "ENTERED_USER_LAND"
29-
30-
trap_add cleanup EXIT
31-
3225
if [[ "$BUILD_ENVIRONMENT" != *win-* ]]; then
3326
if which sccache > /dev/null; then
3427
# Save sccache logs to file

.jenkins/pytorch/common_utils.sh

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,6 @@ trap_add() {
3535
# inherit them unless the trace attribute is set
3636
declare -f -t trap_add
3737

38-
# NB: define this function before set -x, so that we don't
39-
# pollute the log with a premature EXITED_USER_LAND ;)
40-
function cleanup {
41-
# Note that if you've exited user land, then CI will conclude that
42-
# any failure is the CI's fault. So we MUST only output this
43-
# string
44-
retcode=$?
45-
set +x
46-
if [ $retcode -eq 0 ]; then
47-
echo "EXITED_USER_LAND"
48-
fi
49-
}
50-
5138
function assert_git_not_dirty() {
5239
# TODO: we should add an option to `build_amd.py` that reverts the repo to
5340
# an unmodified state.

.lintrunner.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,7 @@ include_patterns = [
562562
'torch/_refs/**/*.py',
563563
'torch/_prims/**/*.py',
564564
'torch/_meta_registrations.py',
565+
'torch/_decomp/**/*.py',
565566
'test/onnx/**/*.py',
566567
]
567568
command = [

aten/src/ATen/native/mps/OperationUtils.mm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@ MPSDataType getMPSDataType(ScalarType scalar_type) {
109109
return MPSDataTypeInt64;
110110
case ScalarType::Short:
111111
return MPSDataTypeInt16;
112-
case ScalarType::Byte:
112+
case ScalarType::Char:
113113
return MPSDataTypeInt8;
114+
case ScalarType::Byte:
115+
return MPSDataTypeUInt8;
114116
case ScalarType::Bool:
115117
return MPSDataTypeBool;
116118
case ScalarType::Double:
@@ -136,8 +138,10 @@ MPSDataType getMPSScalarType(ScalarType scalar_type) {
136138
return MPSDataTypeInt64;
137139
case ScalarType::Short:
138140
return MPSDataTypeInt16;
139-
case ScalarType::Byte:
141+
case ScalarType::Char:
140142
return MPSDataTypeInt8;
143+
case ScalarType::Byte:
144+
return MPSDataTypeUInt8;
141145
case ScalarType::Bool:
142146
return MPSDataTypeBool;
143147
default:

c2_defs.bzl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,6 @@ def get_c2_tvm():
9393
return bool(int(c2_tvm))
9494

9595
_C2_XPLAT_NO_HPTT_PREPROCESSOR_FLAGS = [
96-
"-fexceptions",
97-
"-frtti",
98-
"-Wno-shadow",
99-
"-Wno-unknown-pragmas",
100-
"-Wno-unused-variable",
101-
"-Wno-sign-compare",
10296
"-Icaffe2",
10397
"-Imodules",
10498
"-DEIGEN_NO_DEBUG",
@@ -139,7 +133,13 @@ def get_c2_xplat_preprocessor_flags():
139133
def get_c2_xplat_no_hptt_compiler_flags():
140134
return [
141135
"-Os",
142-
] + get_c2_xplat_no_hptt_preprocessor_flags()
136+
"-fexceptions",
137+
"-frtti",
138+
"-Wno-shadow",
139+
"-Wno-unknown-pragmas",
140+
"-Wno-unused-variable",
141+
"-Wno-sign-compare",
142+
]
143143

144144
def get_c2_xplat_compiler_flags():
145145
return get_c2_xplat_no_hptt_compiler_flags() + C2_XPLAT_HPTT_PREPROCESSOR_FLAGS

docker.Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CUDA_CHANNEL = nvidia
1818
# The conda channel to use to install pytorch / torchvision
1919
INSTALL_CHANNEL = pytorch
2020

21-
PYTHON_VERSION = 3.7
21+
PYTHON_VERSION = 3.8
2222
PYTORCH_VERSION = $(shell git describe --tags --always)
2323
# Can be either official / dev
2424
BUILD_TYPE = dev

0 commit comments

Comments
 (0)
0