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

Libtorch cuda graphs #2441

Merged
merged 17 commits into from
Jun 13, 2023
Merged

Libtorch cuda graphs #2441

merged 17 commits into from
Jun 13, 2023

Conversation

Aidyn-A
Copy link
Contributor

@Aidyn-A Aidyn-A commented Jun 7, 2023

Fixes #2373

Description

This PR adds a tutorial that demonstrates how to CUDAGraphs can be used from C++ application.
Sample code demonstrates training perf improvements from 44 to 7 seconds.

Checklist

  • The issue that is being fixed is referred in the description (see above "Fixes #ISSUE_NUMBER")
  • Only one issue is addressed in this pull request
  • Labels from the issue that this PR is fixing are added to this pull request
  • No unnecessary issues are included into this pull request.

@pytorch-bot
Copy link

pytorch-bot bot commented Jun 7, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/2441

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 6df8287:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@github-actions github-actions bot added docathon-h1-2023 A label for the docathon in H1 2023 advanced nvidia and removed cla signed labels Jun 7, 2023
@netlify
Copy link

netlify bot commented Jun 7, 2023

Deploy Preview for pytorch-tutorials-preview ready!

Name Link
🔨 Latest commit 6df8287
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-tutorials-preview/deploys/6488c4bb9159cf000879a196
😎 Deploy Preview https://deploy-preview-2441--pytorch-tutorials-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@svekars svekars added the CUDA Issues relating to CUDA label Jun 7, 2023
advanced_source/cpp_cuda_graphs.rst Outdated Show resolved Hide resolved
advanced_source/cpp_cuda_graphs.rst Outdated Show resolved Hide resolved
advanced_source/cpp_cuda_graphs.rst Outdated Show resolved Hide resolved
advanced_source/cpp_cuda_graphs.rst Outdated Show resolved Hide resolved
advanced_source/cpp_cuda_graphs.rst Outdated Show resolved Hide resolved
advanced_source/cpp_cuda_graphs.rst Show resolved Hide resolved
advanced_source/cpp_cuda_graphs.rst Outdated Show resolved Hide resolved
advanced_source/cpp_cuda_graphs.rst Outdated Show resolved Hide resolved
advanced_source/cpp_cuda_graphs.rst Show resolved Hide resolved
advanced_source/cpp_cuda_graphs.rst Outdated Show resolved Hide resolved
@svekars svekars requested a review from ezyang June 7, 2023 19:51
@github-actions github-actions bot removed the CUDA Issues relating to CUDA label Jun 7, 2023
advanced_source/cpp_cuda_graphs/mnist.cpp Outdated Show resolved Hide resolved
advanced_source/cpp_cuda_graphs/mnist.cpp Outdated Show resolved Hide resolved
advanced_source/cpp_cuda_graphs/mnist.cpp Outdated Show resolved Hide resolved
advanced_source/cpp_cuda_graphs/mnist.cpp Outdated Show resolved Hide resolved
advanced_source/cpp_cuda_graphs/mnist.cpp Outdated Show resolved Hide resolved
advanced_source/cpp_cuda_graphs/mnist.cpp Outdated Show resolved Hide resolved
advanced_source/cpp_cuda_graphs/mnist.cpp Outdated Show resolved Hide resolved
advanced_source/cpp_cuda_graphs/mnist.cpp Outdated Show resolved Hide resolved
advanced_source/cpp_cuda_graphs/mnist.cpp Show resolved Hide resolved
@ezyang ezyang removed their request for review June 10, 2023 01:29
@ezyang
Copy link
Contributor

ezyang commented Jun 10, 2023

deferring to @malfet on this

advanced_source/cpp_cuda_graphs.rst Outdated Show resolved Hide resolved
advanced_source/cpp_cuda_graphs.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

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

LGTM, adding perf numbers to PR description

@@ -0,0 +1,31 @@
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it will actually compiles with 3.1

Suggested change
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
cmake_minimum_required(VERSION 3.18 FATAL_ERROR)

@malfet malfet merged commit 6dc7f82 into pytorch:main Jun 13, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advanced cla signed docathon-h1-2023 A label for the docathon in H1 2023 nvidia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

💡 [REQUEST] - Write a LibTorch CUDA Graph tutorial
5 participants