Skip to content

Commit

Permalink
Update base for Update on "[NVFuser] Upstream push 0907"
Browse files Browse the repository at this point in the history
Syncing nvfuser devel branch to upstream master. https://github.com/csarofeen/pytorch/

Codegen changes include:

- codegen improvement:
i. improved view support on pointwise and transpose scheduler
ii. grouped grid welford added for better outer-norm grid persistence in normalization

- misc:
i. new composite ops added: variance_mean , arange, 
ii. fixes misaligned address for transpose scheduler
iii. refactor on separation of compilation API from execution API to prepare us for async compilation
iv. double type support on expression evaluator
v. PYTORCH_NVFUSER_DUMP refactor to save PTX and CUBIN

Commits that's in this PR from the devel branch:
```
89330aa Tensor factories must set the output shape as its input (#1939)
b2fd01e arange support (#1933)
56c00fd Double support on all expression evaluators (#1937)
371f282 Improve trivial reduction merge support (#1931)
1d0c267 Test `rand` in a fusion with zero tensor input (#1932)
0dab160 Fix softmax bwd sizes. (#1890)
ef98f36 Fix a bug (#1936)
63132a0 Propagate permissive mapping information into indexing pass (#1929)
b4ac2c8 Map IterationDomains through view operations. (#1919)
c0a187a do not use deprecated functions (#1935)
88de85e Upstream cherry pick fixes 0811 (#1934)
b247dcf Separate kernel compilation API from kernel execution API (#1914)
b34e3b9 Fix `ir_utils::hasBlockSync` + misc fixes in transpose scheduler (#1924)
14a53e6 Nullary RNGOp (#1892)
3c3c89e Misc fixes/tuning for transpose scheduler (#1912)
20cf109 Grouped grid welford (#1921)
6cf7eb0 Transpose scheduler small dim sizes better support (#1910)
9341ea9 Disabled ViewPersistentShmoo sizes that results in NAN (#1922)
057237f Fix CUDA driver error: misaligned address for transpose scheduler  (#1918)
3fb3d80 Add variance_mean function using Welford (#1907)
98febf6 Remove DisableOption::UnrollWithRng (#1913)
ee8ef33 Minor fix for the debug interface of using PTX directly (#1917)
6e8f953 Add PYTORCH_NVFUSER_DUMP options to save PTX and CUBIN (#1916)
5eefa9a dopt is only available since nvrtc 11.7 (#1915)
2ec8fc7 Kill computeAtBetween (#1911)
d0d106a Improve view support on pointwise and transpose scheduler (#1906)
e71e1ec Fix name clash of RNG with shared memory (#1904)
3381793 Fix mutator and sameAs for expanded IterDomain (#1902)
```

RUN_TORCHBENCH: nvfuser

Differential Revision: [D39324552](https://our.internmc.facebook.com/intern/diff/D39324552)

[ghstack-poisoned]
  • Loading branch information
jjsjann123 committed Sep 8, 2022
2 parents 1a33e94 + 8bd9fe3 commit e74b110
Show file tree
Hide file tree
Showing 89 changed files with 2,532 additions and 1,587 deletions.
13 changes: 12 additions & 1 deletion .github/actions/teardown-linux/action.yml
Expand Up @@ -16,7 +16,18 @@ runs:
# Always hold for active ssh sessions
shell: bash
if: inputs.skip-wait-ssh == ''
run: .github/scripts/wait_for_ssh_to_drain.sh
run: |
set -eou pipefail
echo "Holding runner for 2 hours until all ssh sessions have logged out"
for _ in $(seq 1440); do
# Break if no ssh session exists anymore
if [ "$(who)" = "" ]; then
break
fi
echo "."
sleep 5
done
- name: Kill containers, clean up images
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/ci_commit_pins/torchdynamo.txt
@@ -1 +1 @@
01bf13a3029c8f6a8e9989e94e620622d33bfe39
fe3173f7e6c804e6330ac187ea8e4101f45ff9a2
2 changes: 1 addition & 1 deletion .github/ci_commit_pins/vision.txt
@@ -1 +1 @@
4c073b09521604e410bac8a0b0fe0f2680724e0d
84dcf695d64c15f8a0be845ac65901bdde845429
13 changes: 0 additions & 13 deletions .github/scripts/wait_for_ssh_to_drain.sh

This file was deleted.

23 changes: 0 additions & 23 deletions .github/templates/common.yml.j2
Expand Up @@ -199,29 +199,6 @@ on:
env | grep '^CI' >> "/tmp/github_env_${GITHUB_RUN_ID}"
{%- endmacro -%}

{%- macro teardown_ec2_linux(pytorch_directory="") -%}
- name: Hold runner for 2 hours or until ssh sessions have drained
{%- if pytorch_directory %}
working-directory: !{{ pytorch_directory }}
{%- endif %}
# Always hold for active ssh sessions
if: always()
run: .github/scripts/wait_for_ssh_to_drain.sh
- name: Chown workspace
if: always()
run: |
# Ensure the working directory gets chowned back to the current user
docker run --rm -v "$(pwd)":/v -w /v "${ALPINE_IMAGE}" chown -R "$(id -u):$(id -g)" .
- name: Kill containers, clean up images
if: always()
run: |
# ignore expansion of "docker ps -q" since it could be empty
# shellcheck disable=SC2046
docker stop $(docker ps -q) || true
# Prune all of the docker images
docker system prune -af
{%- endmacro -%}

{%- macro teardown_rocm_linux() -%}
- name: Kill containers, clean up images
if: always()
Expand Down
27 changes: 7 additions & 20 deletions .github/workflows/_binary-build-linux.yml
Expand Up @@ -167,11 +167,9 @@ jobs:
run: |
echo "BUILD_SPLIT_CUDA='ON'" >> "$GITHUB_ENV"
- name: Pull Docker image
run: |
retry () {
"$@" || (sleep 1 && "$@") || (sleep 2 && "$@")
}
retry docker pull "${DOCKER_IMAGE}"
uses: ./pytorch/.github/actions/pull-docker-image
with:
docker-image: ${{ inputs.DOCKER_IMAGE }}
- name: Build PyTorch binary
run: |
set -x
Expand Down Expand Up @@ -216,21 +214,10 @@ jobs:
path:
${{ runner.temp }}/artifacts/*

- name: Hold runner for 2 hours or until ssh sessions have drained
working-directory: pytorch/
# Always hold for active ssh sessions
- name: Teardown Linux
if: always()
run: .github/scripts/wait_for_ssh_to_drain.sh
uses: ./pytorch/.github/actions/teardown-linux

- name: Chown workspace
if: always()
run: |
# Ensure the working directory gets chowned back to the current user
docker run --rm -v "$(pwd)":/v -w /v "${ALPINE_IMAGE}" chown -R "$(id -u):$(id -g)" .
- name: Kill containers, clean up images
if: always()
run: |
# ignore expansion of "docker ps -q" since it could be empty
# shellcheck disable=SC2046
docker stop $(docker ps -q) || true
# Prune all of the docker images
docker system prune -af
uses: ./pytorch/.github/actions/chown-workspace
32 changes: 10 additions & 22 deletions .github/workflows/_binary-test-linux.yml
Expand Up @@ -139,13 +139,6 @@ jobs:
rm -rf "${GITHUB_WORKSPACE}"
mkdir "${GITHUB_WORKSPACE}"
- uses: actions/download-artifact@v3
name: Download Build Artifacts
with:
name: ${{ inputs.build_name }}
path: "${{ runner.temp }}/artifacts/"


- name: Checkout PyTorch to pytorch dir
uses: zhouzhuojie/checkout@05b13c9a0d21f08f6d5e64a1d5042246d13619d9
with:
Expand All @@ -171,6 +164,12 @@ jobs:
git clean -fxd
working-directory: builder

- uses: actions/download-artifact@v3
name: Download Build Artifacts
with:
name: ${{ inputs.build_name }}
path: "${{ runner.temp }}/artifacts/"

- name: Install nvidia driver, nvidia-docker runtime, set GPU_FLAG
uses: nick-fields/retry@7d4a37704547a311dbb66ebdf5b23ec19374a767
if: ${{ inputs.GPU_ARCH_TYPE == 'cuda' }}
Expand All @@ -192,21 +191,10 @@ jobs:
- name: Test Pytorch binary
uses: ./pytorch/.github/actions/test-pytorch-binary

- name: Hold runner for 2 hours or until ssh sessions have drained
working-directory: pytorch/
# Always hold for active ssh sessions
- name: Teardown Linux
if: always()
run: .github/scripts/wait_for_ssh_to_drain.sh
uses: ./pytorch/.github/actions/teardown-linux

- name: Chown workspace
if: always()
run: |
# Ensure the working directory gets chowned back to the current user
docker run --rm -v "$(pwd)":/v -w /v "${ALPINE_IMAGE}" chown -R "$(id -u):$(id -g)" .
- name: Kill containers, clean up images
if: always()
run: |
# ignore expansion of "docker ps -q" since it could be empty
# shellcheck disable=SC2046
docker stop $(docker ps -q) || true
# Prune all of the docker images
docker system prune -af
uses: ./pytorch/.github/actions/chown-workspace
4 changes: 4 additions & 0 deletions .github/workflows/upload-test-stats.yml
Expand Up @@ -66,5 +66,9 @@ jobs:
- name: Get our GITHUB_TOKEN API limit usage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYTORCHBOT_TOKEN: ${{ secrets.GH_PYTORCHBOT_TOKEN}}
MERGEBOT_TOKEN: ${{ secrets.MERGEBOT_TOKEN}}
run: |
curl -H "Accept: application/vnd.github.v3+json" -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/rate_limit
curl -H "Accept: application/vnd.github.v3+json" -H "Authorization: token $PYTORCHBOT_TOKEN" https://api.github.com/rate_limit
curl -H "Accept: application/vnd.github.v3+json" -H "Authorization: token $MERGEBOT_TOKEN" https://api.github.com/rate_limit
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -307,6 +307,9 @@ TAGS
# bazel symlinks
bazel-*

# xla repo
xla/

# direnv, posh-direnv
.envrc
.psenvrc
Expand Down
54 changes: 0 additions & 54 deletions .jenkins/caffe2/bench.sh

This file was deleted.

0 comments on commit e74b110

Please sign in to comment.