-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into sdpa_decomposition
- Loading branch information
Showing
13 changed files
with
912 additions
and
66 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,62 +5,67 @@ name: Generate Docs | |
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: [ main ] | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
build-docs: | ||
runs-on: linux.g5.4xlarge.nvidia.gpu | ||
if: ${{ ! contains(github.actor, 'pytorchbot') }} | ||
environment: pytorchbot-env | ||
container: | ||
image: docker.io/pytorch/manylinux-builder:cuda12.4 | ||
options: --gpus all | ||
env: | ||
CUDA_HOME: /usr/local/cuda-12.4 | ||
VERSION_SUFFIX: cu124 | ||
CU_VERSION: cu124 | ||
CHANNEL: nightly | ||
CI_BUILD: 1 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{github.head_ref}} | ||
token: ${{ secrets.GH_PYTORCHBOT_TOKEN }} | ||
- name: Select Python / CUDA | ||
run: | | ||
git config --global --add safe.directory /__w/TensorRT/TensorRT | ||
echo "/opt/python/cp311-cp311/bin/" >> $GITHUB_PATH | ||
build-docs: | ||
runs-on: linux.g5.4xlarge.nvidia.gpu | ||
if: ${{ ! contains(github.actor, 'pytorchbot') }} | ||
environment: pytorchbot-env | ||
container: | ||
image: docker.io/pytorch/manylinux2_28-builder:cuda12.6 | ||
options: --gpus all | ||
env: | ||
CUDA_HOME: /usr/local/cuda-12.6 | ||
VERSION_SUFFIX: cu126 | ||
CU_VERSION: cu126 | ||
CHANNEL: nightly | ||
CI_BUILD: 1 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{github.head_ref}} | ||
token: ${{ secrets.GH_PYTORCHBOT_TOKEN }} | ||
- name: Select Python / CUDA | ||
run: | | ||
git config --global --add safe.directory /__w/TensorRT/TensorRT | ||
echo "/opt/python/cp311-cp311/bin/" >> $GITHUB_PATH | ||
- name: Install base deps | ||
run: | | ||
python3 -m pip install pip --upgrade | ||
python3 -m pip install pyyaml numpy torch --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu124 | ||
./packaging/pre_build_script.sh | ||
- name: Get HEAD SHA | ||
id: vars | ||
run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
- name: Build Python Package | ||
run: | | ||
python3 -m pip install --pre . --extra-index-url https://download.pytorch.org/whl/nightly/cu124 | ||
- name: Generate New Docs | ||
run: | | ||
cd docsrc | ||
yum install -y doxygen pandoc | ||
python3 -m pip install -r requirements.txt | ||
python3 -c "import torch_tensorrt; print(torch_tensorrt.__version__)" | ||
make html | ||
cd .. | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
# Required | ||
commit_message: "docs: [Automated] Regenerating documenation for ${{ steps.vars.outputs.sha }}" | ||
commit_options: "--no-verify --signoff" | ||
file_pattern: docs/ | ||
commit_user_name: Torch-TensorRT Github Bot | ||
commit_user_email: [email protected] | ||
commit_author: Torch-TensorRT Github Bot <[email protected]> | ||
- name: Install base deps | ||
run: | | ||
python3 -m pip install pip --upgrade | ||
python3 -m pip install pyyaml numpy torch --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu124 | ||
./packaging/pre_build_script.sh | ||
- name: Get HEAD SHA | ||
id: vars | ||
run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
- name: Build Python Package | ||
run: | | ||
python3 -m pip install --pre . --extra-index-url https://download.pytorch.org/whl/nightly/cu124 | ||
- name: Generate New Docs | ||
run: | | ||
cd docsrc | ||
dnf clean all | ||
dnf makecache --refresh | ||
dnf install yum-utils -y | ||
dnf config-manager --set-enabled powertools | ||
dnf update --skip-broken --nobest -y | ||
dnf install -y doxygen pandoc | ||
python3 -m pip install -r requirements.txt | ||
python3 -c "import torch_tensorrt; print(torch_tensorrt.__version__)" | ||
make html | ||
cd .. | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
# Required | ||
commit_message: "docs: [Automated] Regenerating documenation for ${{ steps.vars.outputs.sha }}" | ||
commit_options: "--no-verify --signoff" | ||
file_pattern: docs/ | ||
commit_user_name: Torch-TensorRT Github Bot | ||
commit_user_email: [email protected] | ||
commit_author: Torch-TensorRT Github Bot <[email protected]> | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
group: ${{ github.workflow }}-${{ github.ref_name }} | ||
cancel-in-progress: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
name: Generates the binary build matrix | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
package-type: | ||
description: "Package type to build from (wheel, conda, libtorch)" | ||
default: "wheel" | ||
type: string | ||
os: | ||
description: "Operating system to generate for (linux, windows, macos, macos-arm64)" | ||
default: "linux" | ||
type: string | ||
channel: | ||
description: "Channel to use (nightly, test, release, all)" | ||
default: "" | ||
type: string | ||
test-infra-repository: | ||
description: "Test infra repository to use" | ||
default: "pytorch/test-infra" | ||
type: string | ||
test-infra-ref: | ||
description: "Test infra reference to use" | ||
default: "main" | ||
type: string | ||
with-cuda: | ||
description: "Build with Cuda?" | ||
default: "enable" | ||
type: string | ||
with-rocm: | ||
description: "Build with Rocm?" | ||
default: "enable" | ||
type: string | ||
with-cpu: | ||
description: "Build with CPU?" | ||
default: "enable" | ||
type: string | ||
with-xpu: | ||
description: "Build with XPU?" | ||
default: "disable" | ||
type: string | ||
use-only-dl-pytorch-org: | ||
description: "Use only download.pytorch.org when generating wheel install command?" | ||
default: "false" | ||
type: string | ||
build-python-only: | ||
description: "Generate binary build matrix for a python only package (i.e. only one python version)" | ||
default: "disable" | ||
type: string | ||
python-versions: | ||
description: "A JSON-encoded list of python versions to build. An empty list means building all supported versions" | ||
default: "[]" | ||
type: string | ||
use_split_build: | ||
description: | | ||
[Experimental] Build a libtorch only wheel and build pytorch such that | ||
are built from the libtorch wheel. | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
outputs: | ||
matrix: | ||
description: "Generated build matrix" | ||
value: ${{ jobs.generate.outputs.matrix }} | ||
|
||
jobs: | ||
generate: | ||
outputs: | ||
matrix: ${{ steps.generate.outputs.matrix }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- name: Checkout test-infra repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ inputs.test-infra-repository }} | ||
ref: ${{ inputs.test-infra-ref }} | ||
- uses: ./.github/actions/set-channel | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: pytorch/tensorrt | ||
- name: Generate test matrix | ||
id: generate | ||
env: | ||
PACKAGE_TYPE: ${{ inputs.package-type }} | ||
OS: ${{ inputs.os }} | ||
CHANNEL: ${{ inputs.channel != '' && inputs.channel || env.CHANNEL }} | ||
WITH_CUDA: ${{ inputs.with-cuda }} | ||
WITH_ROCM: ${{ inputs.with-rocm }} | ||
WITH_CPU: ${{ inputs.with-cpu }} | ||
WITH_XPU: ${{ inputs.with-xpu }} | ||
# limit pull request builds to one version of python unless ciflow/binaries/all is applied to the workflow | ||
# should not affect builds that are from events that are not the pull_request event | ||
LIMIT_PR_BUILDS: ${{ github.event_name == 'pull_request' && !contains( github.event.pull_request.labels.*.name, 'ciflow/binaries/all') }} | ||
# This is used when testing release binaries only from download.pytorch.org. | ||
# In cases when pipy binaries are not published yet. | ||
USE_ONLY_DL_PYTORCH_ORG: ${{ inputs.use-only-dl-pytorch-org }} | ||
BUILD_PYTHON_ONLY: ${{ inputs.build-python-only }} | ||
USE_SPLIT_BUILD: ${{ inputs.use_split_build }} | ||
PYTHON_VERSIONS: ${{ inputs.python-versions }} | ||
run: | | ||
set -eou pipefail | ||
MATRIX_BLOB="$(python3 .github/scripts/generate_binary_build_matrix.py)" | ||
echo "${MATRIX_BLOB}" | ||
echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}" | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.package-type }}-${{ inputs.os }}-${{ inputs.test-infra-repository }}-${{ inputs.test-infra-ref }} | ||
cancel-in-progress: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters