Skip to content

feat: Win/Linux Dual Compatible WORKSPACE + Upgrade CUDA + Upgrade PyT #2907

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

Merged
merged 14 commits into from
Jun 14, 2024

Conversation

gs-olive
Copy link
Collaborator

@gs-olive gs-olive commented Jun 12, 2024

Description

  • Add support for OS compatibility in the WORKSPACE file and BUILD files across the repository
  • Upgrade bazel version to enable Windows builds in MSVC command prompt
  • Validate multiple builds on CI, including with new Bazel version
  • Upgrade default to CUDA 12.4
  • Upgrade PyTorch versions

Steps to Build on Windows Using the New WORKSPACE

Portions adapted from discussion with @HolyWu in #2806

  • Clone Torch-TRT (this repo)
  • Open x64 Native Tools Command Prompt for VS 2022
  • Install latest version of Torch (i.e. with pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121)
  • Run set DISTUTILS_USE_SDK=1
  • This is analogous to setting LD_LIBRARY_PATH on Linux
  • Run python setup.py bdist_wheel
  • Run python -m pip install dist/*.whl

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 Jun 12, 2024
@gs-olive gs-olive requested a review from narendasan June 12, 2024 02:59
@gs-olive gs-olive self-assigned this Jun 12, 2024
@github-actions github-actions bot added component: tests Issues re: Tests 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: evaluators Issues re: Specific op evaluators component: runtime component: partitioning labels Jun 12, 2024
@gs-olive gs-olive force-pushed the windows_cpp_runtime_bazel branch from 9be7ea1 to 14e079b Compare June 12, 2024 03:08
@gs-olive
Copy link
Collaborator Author

Installation instruction update

@gs-olive gs-olive force-pushed the windows_cpp_runtime_bazel branch from 14e079b to 2202e3c Compare June 13, 2024 21:18
@github-actions github-actions bot removed the component: api [Python] Issues re: Python API label Jun 13, 2024
@github-actions github-actions bot added documentation Improvements or additions to documentation component: api [Python] Issues re: Python API labels Jun 13, 2024
@gs-olive gs-olive changed the title feat: Win/Linux Dual Compatible WORKSPACE feat: Win/Linux Dual Compatible WORKSPACE + Upgrade CUDA + Upgrade PyT Jun 14, 2024
@gs-olive gs-olive removed the WIP Work is in progress, pull request should not be merged yet label Jun 14, 2024
@gs-olive gs-olive requested a review from narendasan June 14, 2024 01:57
Comment on lines -19 to -24
* Open Microsoft Visual Studio
* Open Torch-TensorRT source code folder
* Open Manage configurations -> Edit JSON to open CMakeSettings.json file.
* Configure the CMake build configurations. Following is an example configuration:

.. code-block:: none
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is it useful to leave the old Visual Studio instructions in this tutorial?

Copy link
Collaborator

Choose a reason for hiding this comment

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

The existing windows support was using cmake right ?

Copy link
Collaborator

@peri044 peri044 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 force-pushed the windows_cpp_runtime_bazel branch from 5426b59 to e94ce68 Compare June 14, 2024 20:03
@github-actions github-actions bot added the component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths label Jun 14, 2024
@gs-olive gs-olive force-pushed the windows_cpp_runtime_bazel branch from cf04d92 to 4113b95 Compare June 14, 2024 21:07
@gs-olive gs-olive merged commit 7dc08c5 into pytorch:main Jun 14, 2024
61 checks passed
@gs-olive gs-olive deleted the windows_cpp_runtime_bazel branch June 14, 2024 22:25
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: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: evaluators Issues re: Specific op evaluators component: lowering Issues re: The lowering / preprocessing passes component: partitioning component: runtime component: tests Issues re: Tests documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants