Skip to content

Commit

Permalink
Merge branch 'dev_add_autograd_functional_vjp' of github.com:Oneflow-…
Browse files Browse the repository at this point in the history
…Inc/oneflow into dev_add_autograd_functional_vjp
  • Loading branch information
marigoold committed Dec 14, 2023
2 parents cc9a5ba + 7b3cffe commit 139b2cf
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 53 deletions.
4 changes: 2 additions & 2 deletions .github/actions/upload_oss/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ runs:
exit 0
fi
if [ ! -f "$HOME/ossutil64" ]; then
curl http://gosspublic.alicdn.com/ossutil/1.6.19/ossutil64 -o $HOME/ossutil64
curl http://gosspublic.alicdn.com/ossutil/1.7.15/ossutil64 -o $HOME/ossutil64
fi
chmod 755 $HOME/ossutil64
$HOME/ossutil64 config -e oss-cn-beijing.aliyuncs.com -i ${{ inputs.oss_access_key_id }} -k ${{ inputs.oss_access_key_secret }} -L EN -c $HOME/.ossutilconfig
Expand All @@ -33,7 +33,7 @@ runs:
upload_core_arg+='--exclude "core*"'
fi
set -x
$HOME/ossutil64 cp --update ${dir_arg} ${upload_core_arg} ${{ inputs.src_path }} ${{ inputs.oss_dst_path }}
$HOME/ossutil64 cp --disable-ignore-error --update ${dir_arg} ${upload_core_arg} ${{ inputs.src_path }} ${{ inputs.oss_dst_path }}
shell: bash
env:
OSS_ACCESS_KEY_ID: ${{ inputs.oss_access_key_id }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Checkout Oneflow-Inc/oneflow
if: ${{ github.event.inputs.oneflow-ref == '' }}
uses: actions/checkout@v2
- uses: Oneflow-Inc/get-oneflow@support-cu12
- uses: Oneflow-Inc/get-oneflow@fix-so-skip-for-cu12
name: Build manylinux
id: build-cuda
with:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/community_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Community Release

on:
push:
branches:
- "community/*"
schedule:
# beijing: 6 pm.
# utc: 10 am.
- cron: "0 10 * * *"
workflow_dispatch:
inputs:
priv_branch:
required: false
default: "community"

concurrency:
group: community-release-${{ github.ref }}-${{ inputs.priv_branch }}
cancel-in-progress: true

jobs:
release:
name: Release pip
permissions:
contents: read
pull-requests: write
uses: ./.github/workflows/release.yml
with:
is_priv: true
branch: ${{ inputs.priv_branch || 'community' }}
secrets:
ONEFLOW_PRIV_ORG: ${{ secrets.ONEFLOW_PRIV_ORG }}
ONEFLOW_PRIV_GH_TOKEN: ${{ secrets.ONEFLOW_PRIV_GH_TOKEN }}
ONEFLOW_PRIV_OSS_BUCKET: ${{ secrets.ONEFLOW_PRIV_OSS_BUCKET }}
OSS_ACCESS_KEY_ID: ${{ secrets.OSS_ACCESS_KEY_ID }}
OSS_ACCESS_KEY_SECRET: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
2 changes: 1 addition & 1 deletion .github/workflows/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: Oneflow-Inc/get-oneflow/update-benchmark-history@support-cu12
- uses: Oneflow-Inc/get-oneflow/update-benchmark-history@fix-so-skip-for-cu12
name: Update benchmark history
timeout-minutes: 10
5 changes: 2 additions & 3 deletions .github/workflows/priv_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Priv Release
on:
push:
branches:
- priv-release
- add-cu12-release
- "pro/*"
schedule:
# beijing: 12 pm.
# utc: 4 am.
Expand All @@ -16,7 +15,7 @@ on:
default: "main"

concurrency:
group: priv-release-${{ github.ref }}
group: priv-release-${{ github.ref }}-${{ inputs.priv_branch }}
cancel-in-progress: true

jobs:
Expand Down
29 changes: 4 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
ref: ${{ inputs.branch }}
repository: ${{ secrets.ONEFLOW_PRIV_ORG }}/oneflow
token: ${{ secrets.ONEFLOW_PRIV_GH_TOKEN }}
- uses: Oneflow-Inc/get-oneflow/cache-complete/matrix/build@support-cu12
- uses: Oneflow-Inc/get-oneflow/cache-complete/matrix/build@fix-so-skip-for-cu12
name: Find build cache
id: find-cache
timeout-minutes: 5
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
if: ${{ inputs.is_priv }}
run: |
env
- uses: Oneflow-Inc/get-oneflow@support-cu12
- uses: Oneflow-Inc/get-oneflow@fix-so-skip-for-cu12
name: Build ${{ matrix.entry }}
if: ${{ matrix.entry =='cu118' || startsWith(matrix.entry, 'cu12') }}
with:
Expand All @@ -161,11 +161,10 @@ jobs:
nightly-date: ${{ needs.generate-build-matrix.outputs.formatted_date }}
use-nvidia-wheels: ${{ matrix.entry !='cu112' }}
python-versions: |
3.7
3.8
3.9
3.10
- uses: Oneflow-Inc/get-oneflow@support-cu12
- uses: Oneflow-Inc/get-oneflow@fix-so-skip-for-cu12
name: Build ${{ matrix.entry }}
if: ${{ startsWith(matrix.entry, 'cu') && matrix.entry !='cu118' && !startsWith(matrix.entry, 'cu12') }}
with:
Expand All @@ -186,11 +185,10 @@ jobs:
nightly-date: ${{ needs.generate-build-matrix.outputs.formatted_date }}
use-nvidia-wheels: ${{ matrix.entry !='cu112' }}
python-versions: |
3.7
3.8
3.9
3.10
- uses: Oneflow-Inc/get-oneflow@support-cu12
- uses: Oneflow-Inc/get-oneflow@fix-so-skip-for-cu12
name: Build ${{ matrix.entry }}
if: ${{ matrix.entry =='cpu' }}
with:
Expand All @@ -210,7 +208,6 @@ jobs:
nightly: ${{ github.event_name == 'schedule' || github.ref == 'refs/heads/release/add_nightly_date_index'}}
nightly-date: ${{ needs.generate-build-matrix.outputs.formatted_date }}
python-versions: |
3.7
3.8
3.9
3.10
Expand Down Expand Up @@ -239,21 +236,3 @@ jobs:
READTHEDOCS_TOKEN: ${{ secrets.READTHEDOCS_TOKEN }}
run: |
curl -X POST -d "branches=master" -d "token=${READTHEDOCS_TOKEN}" https://readthedocs.org/api/v2/webhook/oneflow/135376/
pack_src:
name: Pack source code
if: github.ref == 'refs/heads/master' && github.repository == 'Oneflow-Inc/oneflow'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Pack OneFlow source code
env:
OSS_ACCESS_KEY_ID: ${{ secrets.OSS_ACCESS_KEY_ID }}
OSS_ACCESS_KEY_SECRET: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
run: |
git reset --hard
git clean -f
git archive --prefix oneflow/ --format zip HEAD > oneflow-src.zip
curl http://gosspublic.alicdn.com/ossutil/1.6.19/ossutil64 -o $HOME/ossutil64
chmod 755 $HOME/ossutil64
$HOME/ossutil64 config -e oss-cn-beijing.aliyuncs.com -i ${OSS_ACCESS_KEY_ID} -k ${OSS_ACCESS_KEY_SECRET} -L EN -c $HOME/.ossutilconfig
$HOME/ossutil64 cp --update oneflow-src.zip oss://oneflow-public/oneflow-src.zip
4 changes: 2 additions & 2 deletions .github/workflows/simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ jobs:
repository: Oneflow-Inc/conda-env
ref: 30a7f00eb48ee9009d85a848e720823e5054c66b
path: conda-env
- uses: Oneflow-Inc/get-oneflow@support-cu12
- uses: Oneflow-Inc/get-oneflow@fix-so-skip-for-cu12
name: Build with gcc7
if: ${{ matrix.build-type == 'gcc7'}}
with:
Expand All @@ -253,7 +253,7 @@ jobs:
oneflow-build-env: conda
conda-env-file: conda-env/dev/gcc7/environment-v2.yml
conda-env-name: oneflow-dev-gcc7-v2
- uses: Oneflow-Inc/get-oneflow@support-cu12
- uses: Oneflow-Inc/get-oneflow@fix-so-skip-for-cu12
name: Build with clang10
if: ${{ matrix.build-type == 'clang10'}}
with:
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: Oneflow-Inc/get-oneflow/cache-complete/matrix/build@support-cu12
- uses: Oneflow-Inc/get-oneflow/cache-complete/matrix/build@fix-so-skip-for-cu12
name: find cache
id: find-cache
timeout-minutes: 5
Expand Down Expand Up @@ -219,7 +219,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: Oneflow-Inc/get-oneflow/cache-complete@support-cu12
- uses: Oneflow-Inc/get-oneflow/cache-complete@fix-so-skip-for-cu12
name: Save cache if successful
id: save-cache
timeout-minutes: 5
Expand All @@ -233,7 +233,7 @@ jobs:
run: |
echo "::error file=test.yml,line=204,col=10::steps.save-cache.outputs.cache-hit != matrix.cache-hit"
exit 1
- uses: Oneflow-Inc/get-oneflow@support-cu12
- uses: Oneflow-Inc/get-oneflow@fix-so-skip-for-cu12
name: Build manylinux ${{ matrix.entry }}
id: build-cpu
if: ${{ matrix.entry =='cpu' && !matrix.cache-hit }}
Expand All @@ -255,7 +255,7 @@ jobs:
python-versions: |
3.7
3.8
- uses: Oneflow-Inc/get-oneflow@support-cu12
- uses: Oneflow-Inc/get-oneflow@fix-so-skip-for-cu12
name: Build manylinux ${{ matrix.entry }}
id: build-cpu-sanitizers
if: ${{ (matrix.entry == 'cpu-asan-ubsan' || matrix.entry == 'cpu-tsan') && !matrix.cache-hit && false }}
Expand All @@ -276,7 +276,7 @@ jobs:
clean-ccache: ${{ contains(github.event.pull_request.labels.*.name, 'need-clean-ccache') }}
python-versions: |
3.8
- uses: Oneflow-Inc/get-oneflow@support-cu12
- uses: Oneflow-Inc/get-oneflow@fix-so-skip-for-cu12
name: Build manylinux ${{ matrix.entry }}
id: build-cuda
if: ${{ matrix.entry =='cu116' && !matrix.cache-hit }}
Expand All @@ -296,7 +296,7 @@ jobs:
clean-ccache: ${{ contains(github.event.pull_request.labels.*.name, 'need-clean-ccache') }}
python-versions: |
3.7
- uses: Oneflow-Inc/get-oneflow@support-cu12
- uses: Oneflow-Inc/get-oneflow@fix-so-skip-for-cu12
name: Build ${{ matrix.entry }}
if: ${{ matrix.entry == 'llvm15' && !matrix.cache-hit }}
with:
Expand Down Expand Up @@ -335,7 +335,7 @@ jobs:
})
- name: Upload packed liboneflow
if: ${{ !fromJson(matrix.cache-hit) && matrix.entry != 'llvm15' && matrix.entry != 'cpu-asan-ubsan' && matrix.entry != 'cpu-tsan' }}
uses: Oneflow-Inc/get-oneflow/digest/upload@support-cu12
uses: Oneflow-Inc/get-oneflow/digest/upload@fix-so-skip-for-cu12
timeout-minutes: 10
with:
digest: ${{ steps.save-cache.outputs.build-digest }}
Expand All @@ -346,7 +346,7 @@ jobs:
dst-dir: cpack
- name: Upload whl
if: ${{ !fromJson(matrix.cache-hit) && matrix.entry != 'llvm15' && matrix.entry != 'cpu-asan-ubsan' && matrix.entry != 'cpu-tsan' }}
uses: Oneflow-Inc/get-oneflow/digest/upload@support-cu12
uses: Oneflow-Inc/get-oneflow/digest/upload@fix-so-skip-for-cu12
timeout-minutes: 10
with:
digest: ${{ steps.save-cache.outputs.build-digest }}
Expand All @@ -371,7 +371,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: Oneflow-Inc/get-oneflow/cache-complete/matrix/test@support-cu12
- uses: Oneflow-Inc/get-oneflow/cache-complete/matrix/test@fix-so-skip-for-cu12
name: find cache
id: find-cache
timeout-minutes: 5
Expand Down Expand Up @@ -402,7 +402,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: Oneflow-Inc/get-oneflow/cache-complete/matrix/test@support-cu12
- uses: Oneflow-Inc/get-oneflow/cache-complete/matrix/test@fix-so-skip-for-cu12
name: find cache
id: find-cache
timeout-minutes: 5
Expand Down Expand Up @@ -484,7 +484,7 @@ jobs:
if: ${{ contains(matrix.runs-on, 'self-hosted') }}
run: |
docker rm -f ${{ env.TEST_CONTAINER_NAME }} || true
- uses: Oneflow-Inc/get-oneflow/cache-complete@support-cu12
- uses: Oneflow-Inc/get-oneflow/cache-complete@fix-so-skip-for-cu12
name: Save cache if successful
id: save-cache
timeout-minutes: 5
Expand All @@ -500,7 +500,7 @@ jobs:
exit 1
- name: Download wheel and packed liboneflow
if: ${{ !fromJson(matrix.cache-hit) && contains(matrix.runs-on, 'self-hosted') }}
uses: Oneflow-Inc/get-oneflow/digest/download@support-cu12
uses: Oneflow-Inc/get-oneflow/digest/download@fix-so-skip-for-cu12
id: download-digest
timeout-minutes: 10
with:
Expand All @@ -510,7 +510,7 @@ jobs:
ssh-tank-path: ${{ env.SSH_TANK_PATH }}
- name: Get primary node
if: ${{ !fromJson(matrix.cache-hit) && contains(matrix.runs-on, 'self-hosted') }}
uses: Oneflow-Inc/get-oneflow/master-address@support-cu12
uses: Oneflow-Inc/get-oneflow/master-address@fix-so-skip-for-cu12
id: get-primary-node
with:
rank: ${{ matrix.rank }}
Expand Down Expand Up @@ -710,7 +710,7 @@ jobs:
if: ${{ contains(matrix.runs-on, 'self-hosted') }}
run: |
docker rm -f ${{ env.TEST_MANYLINUX_CONTAINER_NAME }} || true
- uses: Oneflow-Inc/get-oneflow/cache-complete@support-cu12
- uses: Oneflow-Inc/get-oneflow/cache-complete@fix-so-skip-for-cu12
name: Save cache if successful
id: save-cache
timeout-minutes: 5
Expand All @@ -726,7 +726,7 @@ jobs:
exit 1
- name: Download wheel and packed liboneflow
if: ${{ !fromJson(matrix.cache-hit) && contains(matrix.runs-on, 'self-hosted') }}
uses: Oneflow-Inc/get-oneflow/digest/download@support-cu12
uses: Oneflow-Inc/get-oneflow/digest/download@fix-so-skip-for-cu12
id: download-digest
timeout-minutes: 10
with:
Expand All @@ -736,7 +736,7 @@ jobs:
ssh-tank-path: ${{ env.SSH_TANK_PATH }}
- name: Download ASAN and UBSAN wheel and packed liboneflow
if: ${{ !fromJson(matrix.cache-hit) && contains(matrix.runs-on, 'self-hosted') && matrix.device == 'cpu' && false }}
uses: Oneflow-Inc/get-oneflow/digest/download@support-cu12
uses: Oneflow-Inc/get-oneflow/digest/download@fix-so-skip-for-cu12
id: asan-ubsan-download-digest
timeout-minutes: 10
with:
Expand All @@ -746,7 +746,7 @@ jobs:
ssh-tank-path: ${{ env.SSH_TANK_PATH }}
- name: Download TSAN wheel and packed liboneflow
if: ${{ !fromJson(matrix.cache-hit) && contains(matrix.runs-on, 'self-hosted') && matrix.device == 'cpu' && false }}
uses: Oneflow-Inc/get-oneflow/digest/download@support-cu12
uses: Oneflow-Inc/get-oneflow/digest/download@fix-so-skip-for-cu12
id: tsan-download-digest
timeout-minutes: 10
with:
Expand Down Expand Up @@ -1072,7 +1072,7 @@ jobs:
- name: Benchmark Test
timeout-minutes: 100
if: ${{ !fromJson(matrix.cache-hit) && matrix.test-type == 'benchmark' && matrix.device == 'cuda' }}
uses: Oneflow-Inc/get-oneflow/pytest-benchmark@support-cu12
uses: Oneflow-Inc/get-oneflow/pytest-benchmark@fix-so-skip-for-cu12
with:
collect-path: ${{ env.FLOW_VISION_SRC }}/benchmark
container-name: ${{ env.TEST_CONTAINER_NAME }}
Expand Down Expand Up @@ -1133,7 +1133,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0
- uses: Oneflow-Inc/get-oneflow/cache-complete@support-cu12
- uses: Oneflow-Inc/get-oneflow/cache-complete@fix-so-skip-for-cu12
name: Save cache if successful
id: save-cache
timeout-minutes: 5
Expand Down
1 change: 1 addition & 0 deletions cmake/caches/cn/cpu.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
set(BUILD_CUDA NO CACHE BOOL "")
set(BUILD_SHARED_LIBS YES CACHE BOOL "")
set(THIRD_PARTY_MIRROR aliyun CACHE STRING "")
set(PIP_INDEX_MIRROR "https://pypi.tuna.tsinghua.edu.cn/simple" CACHE STRING "")
1 change: 1 addition & 0 deletions cmake/caches/international/cpu.cmake
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
set(BUILD_CUDA NO CACHE BOOL "")
set(BUILD_SHARED_LIBS YES CACHE BOOL "")
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
1 change: 1 addition & 0 deletions cmake/caches/international/cuda.cmake
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
set(BUILD_CUDA YES CACHE BOOL "")
set(BUILD_SHARED_LIBS YES CACHE BOOL "")
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")

0 comments on commit 139b2cf

Please sign in to comment.