8000 Rebase after master CI break on "[caffe2] Remove OperatorBase::newsty… · pytorch/pytorch@f66e024 · GitHub
[go: up one dir, main page]

Skip to content

Commit f66e024

Browse files
committed
Rebase after master CI break on "[caffe2] Remove OperatorBase::newstyle_outputs_"
`OperatorBase` maintains `output_tensors_` and `newstyle_outputs_` which hold the same list of tensors except one is `vector<caffe2::Tensor>` and the other is `List<at::Tensor>`. This instead maintains only `output_tensors_` and handles the conversions inside of export_caffe2_op_to_c10. Differential Revision: [D32289811](https://our.internmc.facebook.com/intern/diff/D32289811) [ghstack-poisoned]
2 parents 881db53 + b1fa4d2 commit f66e024

File tree

196 files changed

+3524
-1750
lines changed

Some content is hidden

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

196 files changed

+3524
-1750
lines changed

.github/scripts/lint_test_ownership.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# Team/owner labels usually start with "module: " or "oncall: ", but the following are acceptable exceptions
2323
ACCEPTABLE_OWNER_LABELS = ["NNC", "high priority"]
2424
GLOB_EXCEPTIONS = [
25-
"test/run_test.py"
25+
"**/test/run_test.py"
2626
]
2727

2828
PYTORCH_ROOT = Path(__file__).resolve().parent.parent.parent
@@ -35,7 +35,7 @@
3535
def get_all_test_files() -> List[Path]:
3636
test_files = list(TEST_DIR.glob("**/test_*.py"))
3737
test_files.extend(list(TEST_DIR.glob("**/*_test.py")))
38-
return [f for f in test_files if any([fnmatch.fnmatch(str(f), g) for g in GLOB_EXCEPTIONS])]
38+
return [f for f in test_files if not any([fnmatch.fnmatch(str(f), g) for g in GLOB_EXCEPTIONS])]
3939

4040

4141
def get_pytorch_labels() -> Any:

.github/templates/android_ci_full_workflow.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ on:
3232
- name: print labels
3333
run: echo "${PR_LABELS}"
3434
!{{ common.setup_ec2_linux() }}
35-
!{{ common.checkout_pytorch("recursive") }}
35+
!{{ common.checkout() }}
3636
!{{ common.calculate_docker_image(false) }}
3737
- name: Pull Docker image
3838
run: |

.github/templates/android_ci_workflow.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ on:
3232
- name: print labels
3333
run: echo "${PR_LABELS}"
3434
!{{ common.setup_ec2_linux() }}
35-
!{{ common.checkout_pytorch("recursive") }}
35+
!{{ common.checkout() }}
3636
!{{ common.calculate_docker_image(false) }}
3737
- name: Pull Docker image
3838
run: |

.github/templates/bazel_ci_workflow.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ on:
3232
- name: print labels
3333
run: echo "${PR_LABELS}"
3434
!{{ common.setup_ec2_linux() }}
35-
!{{ common.checkout_pytorch("recursive") }}
35+
!{{ common.checkout() }}
3636
!{{ common.calculate_docker_image(false) }}
3737
- name: Pull Docker image
3838
run: |

.github/templates/common.yml.j2

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,18 +177,28 @@ concurrency:
177177
docker system prune -af
178178
{%- endmacro -%}
179179

180-
{%- macro checkout_pytorch(submodules) -%}
181-
- name: Checkout PyTorch
180+
{%- macro checkout(submodules="recursive", deep_clone=True, directory="", repository="pytorch/pytorch") -%}
181+
- name: Checkout !{{ 'PyTorch' if repository == "pytorch/pytorch" else repository }}
182182
uses: zhouzhuojie/checkout@05b13c9a0d21f08f6d5e64a1d5042246d13619d9
183183
with:
184+
{%- if deep_clone %}
184185
# deep clone, to allow use of git merge-base
185186
fetch-depth: 0
187+
{%- endif %}
186188
submodules: !{{ submodules }}
187-
- name: Clean PyTorch checkout
189+
{%- if repository != "pytorch/pytorch" %}
190+
repository: !{{ repository }}
191+
{%- endif %}
192+
{%- if directory %}
193+
path: !{{ directory }}
194+
{%- endif %}
195+
- name: Clean !{{ 'PyTorch' if repository == "pytorch/pytorch" else repository }} checkout
188196
run: |
189197
# Remove any artifacts from the previous checkouts
190198
git clean -fxd
191-
199+
{%- if directory%}
200+
working-directory: !{{ directory }}
201+
{%- endif %}
192202
{%- endmacro -%}
193203

194204
{%- macro upload_downloaded_files(name, artifact_name="", use_s3=True, when="always()") -%}

.github/templates/docker_builds_ci_workflow.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
name: docker-build (${{ matrix.docker_image_short_name }})
4141
steps:
4242
!{{ common.setup_ec2_linux() }}
43-
!{{ common.checkout_pytorch("recursive") }}
43+
!{{ common.checkout() }}
4444
!{{ common.calculate_docker_image(true) }}
4545
- name: Pull Docker image
4646
run: |

.github/templates/ios_ci_workflow.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
steps:
5454
- name: print labels
5555
run: echo "${PR_LABELS}"
56-
!{{ common.checkout_pytorch("recursive") }}
56+
!{{ common.checkout() }}
5757
!{{ common.setup_miniconda("3.8") }}
5858
- name: Install ios / conda Dependencies
5959
run: |

.github/templates/linux_binary_build_workflow.yml.j2

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,8 @@ jobs:
7777
!{{ binary_env(config) }}
7878
steps:
7979
!{{ common.setup_ec2_linux() }}
80-
- name: Clone pytorch/pytorch
81-
uses: actions/checkout@v2
82-
with:
83-
path: pytorch
84-
submodules: recursive
85-
- name: Clone pytorch/builder
86-
uses: actions/checkout@v2
87-
with:
88-
repository: pytorch/builder
89-
path: builder
80+
!{{ common.checkout(deep_clone=False, directory="pytorch") }}
81+
!{{ common.checkout(deep_clone=False, directory="builder", repository="pytorch/builder") }}
9082
{%- if config["gpu_arch_type"] == 'cuda' and config["gpu_arch_version"].startswith('11') %}
9183
- name: Set BUILD_SPLIT_CUDA
9284
run: |

.github/templates/linux_ci_workflow.yml.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- name: print labels
6868
run: echo "${PR_LABELS}"
6969
!{{ common.setup_ec2_linux() }}
70-
!{{ common.checkout_pytorch("recursive") }}
70+
!{{ common.checkout() }}
7171
!{{ common.calculate_docker_image(false) }}
7272
- name: Pull Docker image
7373
run: |
@@ -207,7 +207,7 @@ jobs:
207207
{%- else %}
208208
!{{ common.setup_ec2_linux() }}
209209
{%- endif %}
210-
!{{ common.checkout_pytorch("recursive") }}
210+
!{{ common.checkout() }}
211211
- name: Pull Docker image
212212
run: |
213213
!{{ common.add_retry_to_env() }}
@@ -367,7 +367,7 @@ jobs:
367367
WITH_PUSH: ${{ github.event_name == 'schedule' }}
368368
steps:
369369
!{{ common.setup_ec2_linux() }}
370-
!{{ common.checkout_pytorch("recursive") }}
370+
!{{ common.checkout() }}
371371
- name: Pull Docker image
372372
run: |
373373
!{{ common.add_retry_to_env() }}

.github/templates/macos_ci_workflow.yml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
steps:
5656
- name: print labels
5757
run: echo "${PR_LABELS}"
58-
!{{ common.checkout_pytorch("recursive") }}
58+
!{{ common.checkout() }}
5959
!{{ common.setup_miniconda("3.8") }}
6060
- name: Install macOS homebrew dependencies
6161
run: |
@@ -125,7 +125,7 @@ jobs:
125125
NUM_TEST_SHARDS: ${{ matrix.num_shards }}
126126
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
127127
steps:
128-
!{{ common.checkout_pytorch("false") }}
128+
!{{ common.checkout(submodules="false") }}
129129
- uses: actions/download-artifact@v2
130130
name: Download PyTorch Build Artifacts from GHA
131131
with:

0 commit comments

Comments
 (0)
0