Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Python Runtime Windows Builds on TRT 10 #2764

Merged
merged 23 commits into from
Apr 25, 2024

Conversation

gs-olive
Copy link
Collaborator

@gs-olive gs-olive commented Apr 19, 2024

Description

  • TRT-10 based implementation of Windows builds

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • [ x ] My code follows the style guidelines of this project (You can use the linters)
  • [ x ] I have performed a self-review of my own code
  • [ x ] I have commented my code, particularly in hard-to-understand areas and hacks
  • [ x ] I have made corresponding changes to the documentation
  • [ x ] I have added tests to verify my fix or my feature
  • [ x ] New and existing unit tests pass locally with my changes
  • [ x ] I have added the relevant labels to my PR in so that relevant reviewers are notified

@gs-olive gs-olive added the WIP Work is in progress, pull request should not be merged yet label Apr 19, 2024
@gs-olive gs-olive self-assigned this Apr 19, 2024
@github-actions github-actions bot added component: lowering Issues re: The lowering / preprocessing passes component: conversion Issues re: Conversion stage component: core Issues re: The core compiler component: converters Issues re: Specific op converters component: build system Issues re: Build system component: api [Python] Issues re: Python API component: api [C++] Issues re: C++ API component: runtime labels Apr 19, 2024
@github-actions github-actions bot requested a review from zewenli98 April 19, 2024 00:19
@gs-olive gs-olive removed the request for review from zewenli98 April 19, 2024 01:34
@gs-olive gs-olive force-pushed the windows_CI_trt_10 branch from 120413b to 8db8a0a Compare April 20, 2024 00:08
@HolyWu
Copy link
Contributor

HolyWu commented Apr 21, 2024

https://github.com/HolyWu/TensorRT/tree/windows_CI_trt_10_fix
Did some cleanup and fixes. Also changed to install torch and trt according to desired_cuda from build matrix, otherwise torch and trt with cuda 12 would be installed in cu118 matrix.

@gs-olive gs-olive force-pushed the windows_CI_trt_10 branch from 96f129e to 6204ef8 Compare April 22, 2024 22:20
@github-actions github-actions bot added the component: tests Issues re: Tests label Apr 22, 2024
@gs-olive
Copy link
Collaborator Author

gs-olive commented Apr 22, 2024

Thanks very much @HolyWu - I've cherry-picked in the non-C++ changes (the C++ runtime will be ported in a different PR), plus some test modifications, and will see how the CI tests go.

@gs-olive gs-olive force-pushed the windows_CI_trt_10 branch from 6204ef8 to bc03fbf Compare April 23, 2024 01:15
@gs-olive gs-olive changed the base branch from trt_10 to release/2.3 April 23, 2024 01:16
@gs-olive gs-olive force-pushed the windows_CI_trt_10 branch from bc03fbf to 5fac363 Compare April 23, 2024 01:17
HolyWu and others added 9 commits April 23, 2024 16:35
Add build-test-windows job

9.3.0 Upgrade and version fixing

Add bazelisk installation

Update installation of Torch-TRT

Bazel install fix

Python only for initial Windows build

Conda install latest cuda toolkit

CUDA Driver Update

CUDA Driver Update 2

Get windows version info

Attempt driver upgrade within system

Switch installer script to curl

Switch installer script to network

Try testing E2E models on Windows

Try linux testing action for Windows

Update Windows build/test

Use local version of yml

Use local version of yml 2

Use local version of yml 3

Use local version of yml 4

Remove CONDA_RUN references

Update Python source

Add torch-trt install script packing

Remove extraneous python references

Replace pipefail command

Replace pipefail command 2

Replace source command

Update cat command for Powershell

Avoid script overwrite in runner

Avoid script overwrite in runner 2

Update path concat to use echo

fix: Use forked infra repository

Skip things not supported by GitHub-hosted Windows runner

Upgrade setuptools and wheel

Rework windows test

Restore root WORKSPACE to original

Attribute naming fix in YML

Enable one test in Windows

Enable GPU Access

Enable GPU Access Attempt 2

Enable GPU Access Attempt 3 - revert

Switch off miniconda setup

Specify Python 3.9 as default for testing

Specify Python 3.9 as default for testing 2

Revert py39 changes, make changes to infra fork, re-enable cu121 installation

Failing cuda installation

Failing cuda installation 2

Failing cuda installation 3

Differentiate pre-build script during build and test

Install trt bindings + lib manually

Switch back to pytorch as repo source

Specify validation runner

Revert "Specify validation runner"

This reverts commit 6d664c0.

Enable more tests

Enable more tests 2

Remove Python runtime specification

Clean up and enable additional Windows tests

Use .bat for driver upgrade

Use .bat for driver upgrade 2

UTF8 encoding for windows testing
@gs-olive gs-olive force-pushed the windows_CI_trt_10 branch from b25d7c2 to f8c300f Compare April 23, 2024 23:43
@gs-olive gs-olive removed the WIP Work is in progress, pull request should not be merged yet label Apr 23, 2024
@gs-olive gs-olive requested a review from narendasan April 23, 2024 23:44
source "${BUILD_ENV_FILE}"

# Install test index version of Torch and Torchvision
${CONDA_RUN} pip install torch torchvision --index-url https://download.pytorch.org/whl/test/${CU_VERSION}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually you can restore this line back to ${CONDA_RUN} ${PIP_INSTALL_TORCH} torchvision like before. The reason you had to manually specify test index is that, when you were using trt_10 as base branch, the set-channel action set CHANNEL to nightly and hence PIP_INSTALL_TORCH was set to install nightly build. Now you have changed the base branch to release/2.3, the set-channel action set CHANNEL to test and hence PIP_INSTALL_TORCH was set to install test build.

python -m pip install -U numpy packaging pyyaml setuptools wheel

# Install Torch from Test Index
python -m pip install torch==2.3.0 --index-url https://download.pytorch.org/whl/test/${CU_VERSION}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can be complete removed for the same reason as above, since the Install torch dependency step already installed the desired version.

Copy link
Collaborator

@narendasan narendasan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gs-olive gs-olive merged commit 8b9836f into pytorch:release/2.3 Apr 25, 2024
36 checks passed
@gs-olive gs-olive deleted the windows_CI_trt_10 branch April 25, 2024 17:34
gs-olive added a commit that referenced this pull request Apr 25, 2024
Co-authored-by: HolyWu <holywu@gmail.com>
gs-olive added a commit that referenced this pull request Apr 25, 2024
Co-authored-by: HolyWu <holywu@gmail.com>
gs-olive added a commit that referenced this pull request Apr 25, 2024
Co-authored-by: HolyWu <holywu@gmail.com>
zewenli98 pushed a commit that referenced this pull request Apr 26, 2024
Co-authored-by: HolyWu <holywu@gmail.com>
gs-olive added a commit that referenced this pull request Apr 26, 2024
Co-authored-by: HolyWu <holywu@gmail.com>
gs-olive added a commit that referenced this pull request Apr 29, 2024
Co-authored-by: HolyWu <holywu@gmail.com>
gs-olive added a commit that referenced this pull request Apr 30, 2024
Co-authored-by: HolyWu <holywu@gmail.com>
narendasan pushed a commit that referenced this pull request May 1, 2024
laikhtewari pushed a commit that referenced this pull request May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed component: api [C++] Issues re: C++ API component: api [Python] Issues re: Python API component: build system Issues re: Build system component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters component: core Issues re: The core compiler component: lowering Issues re: The lowering / preprocessing passes component: runtime component: tests Issues re: Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants