8000 Update · pytorch/pytorch@57e1a5e · GitHub
[go: up one dir, main page]

Skip to content

Commit 57e1a5e

Browse files
Update
[ghstack-poisoned]
2 parents abb2b21 + cc73aad commit 57e1a5e

File tree

173 files changed

+3966
-2351
lines changed

Some content is hidden

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

173 files changed

+3966
-2351
lines changed

.ci/pytorch/build.sh

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -99,30 +99,6 @@ if [[ "$BUILD_ENVIRONMENT" == *aarch64* ]]; then
9999
export ACL_ROOT_DIR=/ComputeLibrary
100100
fi
101101

102-
if [[ "$BUILD_ENVIRONMENT" == *libtorch* ]]; then
103-
POSSIBLE_JAVA_HOMES=()
104-
POSSIBLE_JAVA_HOMES+=(/usr/local)
105-
POSSIBLE_JAVA_HOMES+=(/usr/lib/jvm/java-8-openjdk-amd64)
106-
POSSIBLE_JAVA_HOMES+=(/Library/Java/JavaVirtualMachines/*.jdk/Contents/Home)
107-
# Add the Windows-specific JNI
108-
POSSIBLE_JAVA_HOMES+=("$PWD/.circleci/windows-jni/")
109-
for JH in "${POSSIBLE_JAVA_HOMES[@]}" ; do
110-
if [[ -e "$JH/include/jni.h" ]] ; then
111-
# Skip if we're not on Windows but haven't found a JAVA_HOME
112-
if [[ "$JH" == "$PWD/.circleci/windows-jni/" && "$OSTYPE" != "msys" ]] ; then
113-
break
114-
fi
115-
echo "Found jni.h under $JH"
116-
export JAVA_HOME="$JH"
117-
export BUILD_JNI=ON
118-
break
119-
fi
120-
done
121-
if [ -z "$JAVA_HOME" ]; then
122-
echo "Did not find jni.h"
123-
fi
124-
fi
125-
126102
# Use special scripts for Android builds
127103
if [[ "${BUILD_ENVIRONMENT}" == *-android* ]]; then
128104
export ANDROID_NDK=/opt/ndk

.ci/pytorch/macos-test.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ test_torchbench_smoketest() {
232232
mkdir -p "$TEST_REPORTS_DIR"
233233

234234
local device=mps
235-
local models=(hf_T5 llama BERT_pytorch dcgan hf_GPT2 yolov3 resnet152 sam pytorch_unet stable_diffusion_text_encoder moco speech_transformer)
235+
local models=(hf_T5 llama BERT_pytorch dcgan hf_GPT2 yolov3 resnet152 sam pytorch_unet stable_diffusion_text_encoder speech_transformer Super_SloMo)
236+
local hf_models=(GoogleFnet YituTechConvBert)
236237

237238
for backend in eager inductor; do
238239

@@ -253,6 +254,16 @@ test_torchbench_smoketest() {
253254
--output "$TEST_REPORTS_DIR/inductor_${backend}_torchbench_${dtype}_inference_${device}_accuracy.csv" || true
254255
fi
255256
done
257+
for model in "${hf_models[@]}"; do
258+
if [ "$backend" == "inductor" ]; then
259+
PYTHONPATH="$(pwd)"/torchbench python benchmarks/dynamo/huggingface.py \
260+
--performance --only "$model" --backend "$backend" --inference --devices "$device" "$dtype_arg" \
261+
--output "$TEST_REPORTS_DIR/inductor_${backend}_torchbench_${dtype}_inference_${device}_performance.csv" || true
262+
PYTHONPATH="$(pwd)"/torchbench python benchmarks/dynamo/huggingface.py \
263+
--accuracy --only "$model" --backend "$backend" --inference --devices "$device" "$dtype_arg" \
264+
--output "$TEST_REPORTS_DIR/inductor_${backend}_torchbench_${dtype}_inference_${device}_accuracy.csv" || true
265+
fi
266+
done
256267
done
257268

258269
for dtype in notset amp; do

.ci/pytorch/test.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,10 +431,11 @@ test_inductor_cpp_wrapper_shard() {
431431

432432
if [[ "$1" -eq "2" ]]; then
433433
# For now, manually put the opinfo tests in shard 2, and all other tests in
434-
# shard 1. Test specific things triggering past bugs, for now.
434+
# shard 1. Run all CPU tests, as well as specific GPU tests triggering past
435+
# bugs, for now.
435436
python test/run_test.py \
436437
--include inductor/test_torchinductor_opinfo \
437-
-k 'linalg or to_sparse' \
438+
-k 'linalg or to_sparse or TestInductorOpInfoCPU' \
438439
--verbose
439440
exit
440441
fi

.flake8

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ ignore =
1616
# these ignores are from flake8-comprehensions; please fix!
1717
C407,
1818
# these ignores are from flake8-logging-format; please fix!
19-
G100,G101,G200,
20-
# G201 replaced by LOG400 in ruff
21-
G201,
19+
G100,G101,G200
2220
# these ignores are from flake8-simplify. please fix or ignore with commented reason
2321
SIM105,SIM108,SIM110,SIM111,SIM113,SIM114,SIM115,SIM116,SIM117,SIM118,SIM119,SIM12,
2422
# SIM104 is already covered by pyupgrade ruff

.github/merge_rules.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,13 +393,13 @@
393393
- torch/_inductor/mkldnn_lowerings.py
394394
- torch/_inductor/fx_passes/mkldnn_fusion.py
395395
- torch/_inductor/fx_passes/quantization.py
396-
- torch/_inductor/codegen/cpp_prefix.h
397396
- torch/_inductor/codegen/cpp.py
398397
- torch/_inductor/codegen/cpp_utils.py
399398
- torch/_inductor/codegen/cpp_micro_gemm.py
400399
- torch/_inductor/codegen/cpp_template_kernel.py
401400
- torch/_inductor/codegen/cpp_template.py
402401
- torch/_inductor/codegen/cpp_gemm_template.py
402+
- torch/csrc/inductor/cpp_prefix.h
403403
- test/inductor/test_mkldnn_pattern_matcher.py
404404
- test/inductor/test_cpu_repro.py
405405
- test/inductor/test_cpu_cpp_wrapper.py

.github/pytorch-probot.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ ciflow_push_tags:
2525
- ciflow/unstable
2626
- ciflow/xpu
2727
- ciflow/torchbench
28-
- ciflow/autoformat
2928
- ciflow/op-benchmark
3029
- ciflow/pull
3130
- ciflow/h100

.github/scripts/runner_determinator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,9 +623,9 @@ def main() -> None:
623623
is_canary,
624624
)
625625

626-
except Exception:
627-
log.exception(
628-
"Failed to get issue. Defaulting to Meta runners and no experiments."
626+
except Exception as e:
627+
log.error(
628+
f"Failed to get issue. Defaulting to Meta runners and no experiments. Exception: {e}"
629629
)
630630

631631
set_github_output(GH_OUTPUT_KEY_LABEL_TYPE, runner_label_prefix)

.github/workflows/lint-autoformat.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
name: Apply lint suggestions
22

33
on:
4-
5-
push:
6-
tags:
7-
- ciflow/autoformat/*
4+
pull_request:
5+
types: [opened, synchronize, reopened, labeled, unlabeled]
86

97
jobs:
108
lintrunner-autoformat:
119
permissions:
1210
contents: read
1311
pull-requests: write
1412
runs-on: lf.linux.2xlarge
15-
if: ${{ github.repository_owner == 'pytorch' && github.event.pull_request.user.login != 'ezyang' && github.event.pull_request.user.login != 'malfet' && !startsWith(github.head_ref, 'export-') }}
13+
if: ${{ github.repository_owner == 'pytorch' && contains(github.event.pull_request.labels.*.name, 'autoformat') }}
1614
steps:
1715
- name: Checkout pytorch
1816
uses: pytorch/pytorch/.github/actions/checkout-pytorch@main
@@ -21,12 +19,11 @@ jobs:
2119
fetch-depth: 0
2220
- name: Run lintrunner (nonretryable)
2321
continue-on-error: true
24-
# we can't run all files here because only changes around where the diff are shown in the PR UI
2522
run: |
2623
set -ex
2724
python3 -m venv /tmp/venv
2825
source /tmp/venv/bin/activate
29-
export ADDITIONAL_LINTRUNNER_ARGS="format"
26+
export ADDITIONAL_LINTRUNNER_ARGS="format --all-files"
3027
bash .github/scripts/lintrunner.sh
3128
- name: Check for changes
3229
id: git-check

.github/workflows/trunk.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ jobs:
138138
build-environment: win-vs2022-cpu-py3
139139
cuda-version: cpu
140140
test-matrix: ${{ needs.win-vs2022-cpu-py3-build.outputs.test-matrix }}
141+
disable-monitor: false
141142
secrets: inherit
142143

143144
win-vs2022-cuda12_6-py3-build:

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@
7070
ignore = dirty
7171
path = third_party/fbgemm
7272
url = https://github.com/pytorch/fbgemm
73+
[submodule "android/libs/fbjni"]
74+
ignore = dirty
75+
path = android/libs/fbjni
76+
url = https://github.com/facebookincubator/fbjni.git
7377
[submodule "third_party/XNNPACK"]
7478
ignore = dirty
7579
path = third_party/XNNPACK

0 commit comments

Comments
 (0)
0