Skip to content

Commit

Permalink
Merge branch 'main' into Cjian/pytoml
Browse files Browse the repository at this point in the history
# Conflicts:
#	orttraining/orttraining/models/pipeline_poc/main.cc
  • Loading branch information
jchen351 committed Oct 25, 2024
2 parents d6e3e02 + 7acbd51 commit a0225d9
Show file tree
Hide file tree
Showing 180 changed files with 3,962 additions and 1,447 deletions.
34 changes: 34 additions & 0 deletions .config/1espt/PipelineAutobaseliningConfig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## DO NOT MODIFY THIS FILE MANUALLY. This is part of auto-baselining from 1ES Pipeline Templates. Go to [https://aka.ms/1espt-autobaselining] for more details.

pipelines:
1624:
retail:
source:
credscan:
lastModifiedDate: 2024-10-24
policheck:
lastModifiedDate: 2024-10-24
eslint:
lastModifiedDate: 2024-10-24
psscriptanalyzer:
lastModifiedDate: 2024-10-24
armory:
lastModifiedDate: 2024-10-24
1299:
retail:
source:
credscan:
lastModifiedDate: 2024-10-25
eslint:
lastModifiedDate: 2024-10-25
psscriptanalyzer:
lastModifiedDate: 2024-10-25
armory:
lastModifiedDate: 2024-10-25
binary:
credscan:
lastModifiedDate: 2024-10-25
binskim:
lastModifiedDate: 2024-10-25
spotbugs:
lastModifiedDate: 2024-10-25
7 changes: 7 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: "CodeQL config"
queries:
- uses: security-extended
- uses: security-and-quality
paths-ignore:
- tests
- build
2 changes: 1 addition & 1 deletion .github/workflows/cffconvert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
validate:
name: "validate"
runs-on: ubuntu-latest
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v4
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
permissions:
actions: read
contents: read
Expand Down Expand Up @@ -55,6 +55,11 @@ jobs:
java-version: '11'
distribution: 'microsoft'

- if: ${{ matrix.language == 'javascript' }}
uses: actions/setup-node@v4
with:
node-version: 20

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- if: ${{ matrix.language != 'cpp' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on: [push, pull_request]
jobs:
validation:
name: "Validation"
runs-on: ubuntu-latest
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v4
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:

jobs:
triage:
runs-on: ubuntu-latest
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
steps:
- uses: github/[email protected]
with:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
lint-python-format:
# Required workflow
name: Python format
runs-on: ubuntu-latest
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
steps:
- uses: actions/checkout@v4
- name: Setup Python
Expand Down Expand Up @@ -114,9 +114,12 @@ jobs:

lint-js:
name: Lint JavaScript
runs-on: ubuntu-latest
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: reviewdog/action-eslint@v1
with:
reporter: github-pr-check
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/linux_training.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: orttraining-linux-ci-pipeline
on:
push:
branches:
- main
- rel-*
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
orttraining-linux-ci-pipeline:
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- run: |
python3 -m pip install --user -r tools/ci_build/github/linux/python/requirements.txt
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
config-file: ./.github/codeql/codeql-config.yml
languages: 'cpp'
- run: |
set -e -x
rm -rf build
python3 tools/ci_build/build.py --build_dir build --config Release --enable_training --skip_submodule_sync --parallel --update --build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:cpp"
output: sarif-results
upload: failure-only

- name: filter-sarif
uses: advanced-security/filter-sarif@v1
with:
patterns: |
+**/*.cc
+**/*.h
-tests/**/*.*
-build/**/*.*
input: sarif-results/cpp.sarif
output: sarif-results/cpp.sarif

- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: sarif-results/cpp.sarif
17 changes: 10 additions & 7 deletions .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:
jobs:
auto-apply-fixes:
name: Suggest fixes
runs-on: ubuntu-latest
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
permissions:
contents: read
pull-requests: write
Expand All @@ -34,14 +34,17 @@ jobs:
with:
toolchain: stable
components: rustfmt
- name: Install dependencies

- name: Update PATH
run: |
python -m pip install -r requirements-dev.txt
python -m pip install lintrunner lintrunner-adapters
lintrunner init
- name: Run lintrunner on all files
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Install dependencies and run lintrunner on all files
run: |
set +e
set -e
python -m pip install --user -r requirements-dev.txt
python -m pip install --user lintrunner lintrunner-adapters
lintrunner init
lintrunner f --all-files -v
exit 0
- uses: parkerbxyz/suggest-changes@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-c-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ permissions:
jobs:
build:
name: Generate C/C++ API docs
runs-on: ubuntu-latest
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
steps:
- uses: actions/checkout@v4
- name: Install doxygen and dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-csharp-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ permissions:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
env:
DOCFXVERSION: 2.62.2
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
placeholder:
runs-on: ubuntu-latest
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
steps:
- name: Placeholder step to have workflow included in the GitHub web UI
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-java-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ permissions:
jobs:
build:
name: Generate Java docs
runs-on: ubuntu-latest
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-js-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ permissions:
jobs:
build:
name: Generate JS API docs
runs-on: ubuntu-latest
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-python-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ permissions:
jobs:
build:
name: Generate Python API docs
runs-on: ubuntu-latest
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
steps:
- uses: actions/checkout@v4
- name: Install tools
Expand Down
45 changes: 42 additions & 3 deletions .github/workflows/sca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

- name: Download cuda
run: azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v11.8" cuda_sdk
Expand All @@ -57,6 +57,45 @@ jobs:
sarif_file: ${{ github.workspace }}\output\MergeResult.sarif
category: VS_SCA

# With WebGPU, Without python
Onnxruntime-SCA-win32-WebGPU-x64:
permissions:
security-events: write
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"]
steps:
- uses: actions/checkout@v4
with:
submodules: false
- uses: actions/setup-python@v5
with:
python-version: '3.11.x'
architecture: 'x64'

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Delete build folder
run: |
if (Test-Path D:\b) { Remove-Item -Recurse -Force D:\b }
- name: Build code
env:
CAExcludePath: 'C:\Program Files;D:\b;${{ github.workspace }}\cmake'
run: python tools\ci_build\build.py --compile_no_warning_as_error --config Debug --build_dir D:\b --skip_submodule_sync --update --build --parallel --cmake_generator "Visual Studio 17 2022" --build_shared_lib --cmake_extra_defines onnxruntime_USE_CUSTOM_STATIC_ANALYSIS_RULES=ON --cmake_extra_defines onnxruntime_ENABLE_STATIC_ANALYSIS=ON --cmake_extra_defines onnxruntime_REDIRECT_STATIC_ANALYSIS_OUTPUTS_TO_FILE=ON --use_webgpu

- name: Generate sarif
working-directory: D:\b
run: npx @microsoft/sarif-multitool merge *.sarif --recurse --output-directory=${{ github.workspace }}\output --output-file=MergeResult.sarif --merge-runs && dir ${{ github.workspace }}\output

- name: Upload SARIF to GitHub
uses: github/codeql-action/upload-sarif@v3
continue-on-error: true
with:
sarif_file: ${{ github.workspace }}\output\MergeResult.sarif
category: VS_SCA_WIN32_WEBGPU_X64

# No python
Onnxruntime-SCA-win32-WINML-x64:
permissions:
Expand All @@ -73,7 +112,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

- name: Delete build folder
run: |
Expand Down Expand Up @@ -113,7 +152,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

- name: Delete build folder
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/skip-doc-change.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
{%- for name in job_names %}
job{{ loop.index }}:
name: {{ name }}
runs-on: ubuntu-latest
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
steps:
- run: 'echo "No build required, only documentation changed"'
{% endfor %}
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
close-stale-issues:
runs-on: ubuntu-latest
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
permissions:
issues: write
pull-requests: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/title-only-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:

jobs:
triage:
runs-on: ubuntu-latest
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
steps:
- uses: github/[email protected]
with:
Expand Down
1 change: 1 addition & 0 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ option(onnxruntime_WEBASSEMBLY_RUN_TESTS_IN_BROWSER "Enable this option to run t
option(onnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO "Enable this option to turn on DWARF format debug info" OFF)
option(onnxruntime_ENABLE_WEBASSEMBLY_PROFILING "Enable this option to turn on WebAssembly profiling and preserve function names" OFF)
option(onnxruntime_ENABLE_WEBASSEMBLY_OUTPUT_OPTIMIZED_MODEL "Enable this option to allow WebAssembly to output optimized model" OFF)
option(onnxruntime_ENABLE_WEBASSEMBLY_MEMORY64 "Enable this option to allow WebAssembly to use 64bit memory" OFF)

# Enable bitcode for iOS
option(onnxruntime_ENABLE_BITCODE "Enable bitcode for iOS only" OFF)
Expand Down
5 changes: 5 additions & 0 deletions cmake/adjust_global_compile_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
string(APPEND CMAKE_CXX_FLAGS " -s DISABLE_EXCEPTION_CATCHING=0")
endif()

if (onnxruntime_ENABLE_WEBASSEMBLY_MEMORY64)
string(APPEND CMAKE_C_FLAGS " -DORT_WASM64")
string(APPEND CMAKE_CXX_FLAGS " -DORT_WASM64")
endif()

# Build WebAssembly with multi-threads support.
if (onnxruntime_ENABLE_WEBASSEMBLY_THREADS)
string(APPEND CMAKE_C_FLAGS " -pthread -Wno-pthreads-mem-growth")
Expand Down
Loading

0 comments on commit a0225d9

Please sign in to comment.