10000 Merge branch 'master' of github.com:rdspring1/pytorch into ref_nll_loss · pytorch/pytorch@e7a3ae4 · GitHub
[go: up one dir, main page]

Skip to content

Commit e7a3ae4

Browse files
committed
Merge branch 'master' of github.com:rdspring1/pytorch into ref_nll_loss
2 parents 612ce91 + 8a926b3 commit e7a3ae4

File tree

253 files changed

+4649
-3728
lines changed

Some content is hidden

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

253 files changed

+4649
-3728
lines changed

.circleci/docker/requirements-ci.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ numba==0.55.2 ; python_version == "3.10"
129129
#Pinned versions:
130130
#test that import:
131131

132-
protobuf==3.20.1
132+
protobuf==3.20.2
133133
#Description: Google’s data interchange format
134134
#Pinned versions: 3.20.1
135135
#test that import: test_tensorboard.py
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
41c44bc1d080d6cf063419a4166732b983b84eef
1+
6ead5cae0d1234aa64db06fe230ef56e12ec76fe

.github/ci_commit_pins/vision.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7046e56fe4370e94339b3e8b6fd011e285294a3a
1+
a35be97a6e6725c83032315a8f5e5f6911c9ef41

.github/ci_commit_pins/xla.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
einsum-path
1+
76c65b13280cd5782ace8050df45564ef17891f9

.github/workflows/_ios-build-test.yml

Lines changed: 6 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,6 @@ on:
2323
If this is set, our linter will use this to make sure that every other
2424
job with the same `sync-tag` is id 10000 entical.
2525
26-
secrets:
27-
IOS_CERT_KEY_2022:
28-
required: true
29-
description: ios cert
30-
IOS_CERT_SECRET:
31-
required: true
32-
description: ios cert
33-
IOS_DEV_TEAM_ID:
34-
required: true
35-
description: ios cert
36-
IOS_SIGN_KEY_2022:
37-
required: true
38-
description: ios cert
39-
4026
env:
4127
GIT_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
4228
BUILD_ENVIRONMENT: ${{ inputs.build-environment }}
@@ -45,16 +31,8 @@ env:
4531

4632
jobs:
4733
build:
48-
# NOTE: These builds will not run successfully without running on `pytorch/pytorch` due to the limitations
49-
# of accessing secrets from forked pull requests and IOS' dependency on secrets for their build/test
50-
if: github.repository_owner == 'pytorch'
5134
runs-on: macos-12
5235
timeout-minutes: 240
53-
env:
54-
IOS_CERT_KEY_2022: ${{ secrets.IOS_CERT_KEY_2022 }}
55-
IOS_CERT_SECRET: ${{ secrets.IOS_CERT_SECRET }}
56-
IOS_DEV_TEAM_ID: ${{ secrets.IOS_DEV_TEAM_ID }}
57-
IOS_SIGN_KEY_2022: ${{ secrets.IOS_SIGN_KEY_2022 }}
5836
steps:
5937
# [see note: pytorch repo ref]
6038
- name: Checkout PyTorch
@@ -108,29 +86,15 @@ jobs:
10886
setuptools \
10987
typing_extensions
11088
111-
- name: Run Fastlane
89+
- name: Setup Fastlane
11290
run: |
11391
set -x
11492
cd ios/TestApp
11593
# install fastlane
11694
sudo g 10000 em install bundler && bundle install
11795
bundle update fastlane
118-
# install certificates
119-
echo "${IOS_CERT_KEY_2022}" >> cert.txt
120-
base64 --decode cert.txt -o Certificates.p12
121-
rm cert.txt
122-
bundle exec fastlane install_root_cert
123-
bundle exec fastlane install_dev_cert
124-
# install the provisioning profile
125-
PROFILE=PyTorch_CI_2022.mobileprovision
126-
PROVISIONING_PROFILES=~/Library/MobileDevice/Provisioning\ Profiles
127-
mkdir -pv "${PROVISIONING_PROFILES}"
128-
cd "${PROVISIONING_PROFILES}"
129-
echo "${IOS_SIGN_KEY_2022}" >> cert.txt
130-
base64 --decode cert.txt -o ${PROFILE}
131-
rm cert.txt
13296
133-
- name: Build
97+
- name: Build PyTorch Mobile Runtime
13498
run: |
13599
# shellcheck disable=SC1091
136100
source "${RUNNER_TEMP}/anaconda/bin/activate"
@@ -139,20 +103,16 @@ jobs:
139103
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname "$(which conda)")/../"}
140104
scripts/build_ios.sh
141105
142-
- name: Run Build Test
106+
- name: Build TestApp
107+
if: inputs.ios-platform == 'SIMULATOR'
143108
timeout-minutes: 5
144109
run: |
145-
PROFILE=PyTorch_CI_2022
146110
# run the ruby build script
147111
if ! [ -x "$(command -v xcodebuild)" ]; then
148112
echo 'Error: xcodebuild is not installed.'
149113
exit 1
150114
fi
151-
if [ "${IOS_PLATFORM}" != "SIMULATOR" ]; then
152-
ruby scripts/xcode_build.rb -i build_ios/install -x ios/TestApp/TestApp.xcodeproj -p "${IOS_PLATFORM}" -c "${PROFILE}" -t "${IOS_DEV_TEAM_ID}"
153-
else
154-
ruby scripts/xcode_build.rb -i build_ios/install -x ios/TestApp/TestApp.xcodeproj -p "${IOS_PLATFORM}"
155-
fi
115+
ruby scripts/xcode_build.rb -i build_ios/install -x ios/TestApp/TestApp.xcodeproj -p "${IOS_PLATFORM}"
156116
157117
- name: Run Simulator Tests
158118
if: inputs.ios-platform == 'SIMULATOR'
@@ -191,6 +151,7 @@ jobs:
191151
else
192152
bundle exec fastlane scan --only_testing TestAppTests/TestAppTests/testFullJIT
193153
fi
154+
194155
- name: Dump Simulator Tests On a Failure
195156
if: |
196157
failure() && inputs.ios-platform == 'SIMULATOR'

.github/workflows/periodic.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,6 @@ jobs:
185185
build-environment: ios-12-5-1-x86-64-coreml
186186
ios-platform: SIMULATOR
187187
ios-arch: x86_64
188-
secrets:
189-
IOS_CERT_KEY_2022: ${{ secrets.IOS_CERT_KEY_2022 }}
190-
IOS_CERT_SECRET: ${{ secrets.IOS_CERT_SECRET}}
191-
IOS_DEV_TEAM_ID: ${{ secrets.IOS_DEV_TEAM_ID}}
192-
IOS_SIGN_KEY_2022: ${{ secrets.IOS_SIGN_KEY_2022 }}
193188

194189
ios-12-5-1-arm64:
195190
name: ios-12-5-1-arm64
@@ -198,11 +193,6 @@ jobs:
198193
build-environment: ios-12-5-1-arm64
199194
ios-platform: OS
200195
ios-arch: arm64
201-
secrets:
202-
IOS_CERT_KEY_2022: ${{ secrets.IOS_CERT_KEY_2022 }}
203-
IOS_CERT_SECRET: ${{ secrets.IOS_CERT_SECRET}}
204-
IOS_DEV_TEAM_ID: ${{ secrets.IOS_DEV_TEAM_ID}}
205-
IOS_SIGN_KEY_2022: ${{ secrets.IOS_SIGN_KEY_2022 }}
206196

207197
ios-12-5-1-arm64-coreml:
208198
name: ios-12-5-1-arm64-coreml
@@ -211,11 +201,6 @@ jobs:
211201
build-environment: ios-12-5-1-arm64-coreml
212202
ios-platform: OS
213203
ios-arch: arm64
214-
secrets:
215-
IOS_CERT_KEY_2022: ${{ secrets.IOS_CERT_KEY_2022 }}
216-
IOS_CERT_SECRET: ${{ secrets.IOS_CERT_SECRET}}
217-
IOS_DEV_TEAM_ID: ${{ secrets.IOS_DEV_TEAM_ID}}
218-
IOS_SIGN_KEY_2022: ${{ secrets.IOS_SIGN_KEY_2022 }}
219204

220205
ios-12-5-1-arm64-custom-ops:
221206
name: ios-12-5-1-arm64-custom-ops
@@ -224,11 +209,6 @@ jobs:
224209
build-environment: ios-12-5-1-arm64-custom-ops
225210
ios-platform: OS
226211
ios-arch: arm64
227-
secrets:
228-
IOS_CERT_KEY_2022: ${{ secrets.IOS_CERT_KEY_2022 }}
229-
IOS_CERT_SECRET: ${{ secrets.IOS_CERT_SECRET}}
230-
IOS_DEV_TEAM_ID: ${{ secrets.IOS_DEV_TEAM_ID}}
231-
IOS_SIGN_KEY_2022: ${{ secrets.IOS_SIGN_KEY_2022 }}
232212

233213
ios-12-5-1-arm64-metal:
234214
name: ios-12-5-1-arm64-metal
@@ -237,11 +217,6 @@ jobs:
237217
build-environment: ios-12-5-1-arm64-metal
238218
ios-platform: OS
239219
ios-arch: arm64
240-
secrets:
241-
IOS_CERT_KEY_2022: ${{ secrets.IOS_CERT_KEY_2022 }}
242-
IOS_CERT_SECRET: ${{ secrets.IOS_CERT_SECRET}}
243-
IOS_DEV_TEAM_ID: ${{ secrets.IOS_DEV_TEAM_ID}}
244-
IOS_SIGN_KEY_2022: ${{ secrets.IOS_SIGN_KEY_2022 }}
245220

246221
buck-build-test:
247222
name: buck-build-test

.github/workflows/trunk.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,6 @@ jobs:
127127
build-environment: ios-12-5-1-x86-64
128128
ios-platform: SIMULATOR
129129
ios-arch: x86_64
130-
secrets:
131-
IOS_CERT_KEY_2022: ${{ secrets.IOS_CERT_KEY_2022 }}
132-
IOS_CERT_SECRET: ${{ secrets.IOS_CERT_SECRET}}
133-
IOS_DEV_TEAM_ID: ${{ secrets.IOS_DEV_TEAM_ID}}
134-
IOS_SIGN_KEY_2022: ${{ secrets.IOS_SIGN_KEY_2022 }}
135130

136131
macos-12-py3-x86-64-build:
137132
name: macos-12-py3-x86-64

CMakeLists.txt

+6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,10 @@ set(BUILD_ONEDNN_GRAPH OFF)
725725
include(cmake/Dependencies.cmake)
726726

727727
# Moved this cmake set option down here because CMAKE_CUDA_COMPILER_VERSION is not avaialble until now
728-
option(USE_FLASH_ATTENTION "Whether to build the flash_attention kernel for scaled dot product attention" OFF)
728+
cmake_dependent_option(
729+
USE_FLASH_ATTENTION
730+
"Whether to build the flash_attention kernel for scaled dot product attention" ON
731+
"USE_CUDA AND NOT ROCM AND NOT MSVC AND NOT CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11.6" OFF)
729732
if(USE_FLASH_ATTENTION)
730733
ADD_DEFINITIONS(-DUSE_FLASH_ATTENTION)
731734
ENDIF()
@@ -824,11 +827,7 @@ if(NOT MSVC)
824827
string(APPEND CMAKE_CXX_FLAGS " -Wall")
825828
string(APPEND CMAKE_CXX_FLAGS " -Wextra")
826829
append_cxx_flag_if_supported("-Werror=return-type" CMAKE_CXX_FLAGS)
827-
if(NOT USE_CUDNN)
828-
# Temporary fix to ignore non virtual dtor error if cudnn is used. A
829-
# separate PR to cudnn_frontend is needed to address this later on
830-
append_cxx_flag_if_supported("-Werror=non-virtual-dtor" CMAKE_CXX_FLAGS)
831-
endif()
830+
append_cxx_flag_if_supported("-Werror=non-virtual-dtor" CMAKE_CXX_FLAGS)
832831
append_cxx_flag_if_supported("-Wno-missing-field-initializers" CMAKE_CXX_FLAGS)
833832
append_cxx_flag_if_supported("-Wno-type-limits" CMAKE_CXX_FLAGS)
834833
append_cxx_flag_if_supported("-Wno-array-bounds" CMAKE_CXX_FLAGS)
@@ -894,6 +893,7 @@ if(NOT MSVC)
894893
append_cxx_flag_if_supported("-Wno-c++14-extensions" CMAKE_CXX_FLAGS)
895894
append_cxx_flag_if_supported("-Wno-constexpr-not-const" CMAKE_CXX_FLAGS)
896895
append_cxx_flag_if_supported("-Wno-missing-braces" CMAKE_CXX_FLAGS)
896+
append_cxx_flag_if_supported("-Wunused-lambda-capture" CMAKE_CXX_FLAGS)
897897
append_cxx_flag_if_supported("-Qunused-arguments" CMAKE_CXX_FLAGS)
898898
if(${USE_COLORIZE_OUTPUT})
899899
endif()

CODEOWNERS

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ nn/qat/ @jerryzh168 @vkuzo
5858
/torch/testing/_internal/distributed @mrshenli @pritamdamania87 @zhaojuanmao @rohan-varma @H-Huang @awgu @kwen2501
5959

6060
# ONNX Export
61-
/torch/csrc/jit/passes/onnx.h @bowenbao @shubhambhokare1
62-
/torch/csrc/jit/passes/onnx.cpp @bowenbao @shubhambhokare1
63-
/torch/csrc/jit/passes/onnx/ @bowenbao @shubhambhokare1
64-
/torch/onnx/ @bowenbao @shubhambhokare1
65-
/test/onnx/ @bowenbao @shubhambhokare1
61+
/torch/csrc/jit/passes/onnx.h @bowenbao @abock
62+
/torch/csrc/jit/passes/onnx.cpp @bowenbao @abock
63+
/torch/csrc/jit/passes/onnx/ @bowenbao @abock
64+
/torch/onnx/ @bowenbao @abock
65+
/test/onnx/ @bowenbao @abock
6666

6767
# Docker
6868
/.circleci/docker/ @jeffdaily

aten/src/ATen/BatchingRegistrations.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <ATen/BatchedFallback.h>
55
#include <ATen/native/ResizeCommon.h>
66
#include <ATen/ATen.h>
7+
#include <ATen/core/IListRef.h>
78
#include <c10/util/irange.h>
89
#include <c10/core/SymIntArrayRef.h>
910

@@ -916,7 +917,7 @@ Tensor mm_batching_rule(const Tensor& self, const Tensor& other) {
916917
TORCH_INTERNAL_ASSERT(false, "either self or other must be a BatchedTensor");
917918
}
918919

919-
Tensor cat_batching_rule(TensorList tensors, int64_t dim) {
920+
Tensor cat_batching_rule(const ITensorListRef& tensors, int64_t dim) {
920921
auto physical_views = MultiBatchVmapTransform::logicalToPhysical(tensors);
921922
auto physical_tensors = fmap(
922923
physical_views, [](const VmapPhysicalView& view) -> Tensor { return view.tensor(); });

0 commit comments

Comments
 (0)
0