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

fix: Fix the CUDAGraphs C++ runtime implementation #3067

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

narendasan
Copy link
Collaborator

@narendasan narendasan commented Aug 7, 2024

Description

Fixes the implementation intra-engine CUDAGraph support in the C++ runtime. Cleans up the implementation to distinctly handle creating and maintaining persistent buffers as well as adds explicit concurrency management between the calling stream and the engine execution stream.

Fixes #

Type of change

Please delete options that are not relevant and/or add your own.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

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

@github-actions github-actions bot added component: tests Issues re: Tests component: conversion Issues re: Conversion stage component: core Issues re: The core compiler component: converters Issues re: Specific op converters component: api [Python] Issues re: Python API component: runtime component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels Aug 7, 2024
@github-actions github-actions bot requested a review from peri044 August 7, 2024 00:47
@narendasan narendasan force-pushed the fix_cuda_graph_cpp branch 7 times, most recently from 37ea7c2 to a6e3234 Compare August 7, 2024 15:57
Copy link
Collaborator Author

@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.

image

@narendasan narendasan force-pushed the fix_cuda_graph_cpp branch 6 times, most recently from 8bd7f78 to 0c8f280 Compare August 7, 2024 23:20
@@ -219,7 +219,7 @@ jobs:
export USE_HOST_DEPS=1
pushd .
cd tests/py/dynamo
python -m pytest -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_test_results.xml runtime/
python -m pytest --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_test_results.xml runtime/
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Update windows tests as well

@narendasan narendasan force-pushed the fix_cuda_graph_cpp branch 6 times, most recently from 43f446f to d7ee6e7 Compare August 8, 2024 05:19
@narendasan narendasan force-pushed the fix_cuda_graph_cpp branch 7 times, most recently from 06241d2 to 96810f3 Compare August 9, 2024 20:07
pushd .
cd tests/py/dynamo
python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_cudagraphs_cpp_test_results.xml runtime/test_002_cudagraphs_cpp.py
#python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_cudagraphs_py_test_results.xml runtime/test_002_cudagraphs_py.py
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Uncomment the py tests

Copy link
Collaborator

@zewenli98 zewenli98 left a comment

Choose a reason for hiding this comment

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

LGTM

export USE_HOST_DEPS=1
pushd .
cd tests/py/dynamo
nvidia-smi
Copy link
Collaborator

Choose a reason for hiding this comment

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

need this for the logs ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah

Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
@narendasan narendasan merged commit e772ffc into main Aug 15, 2024
37 of 67 checks passed
@narendasan narendasan deleted the fix_cuda_graph_cpp branch August 15, 2024 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed component: api [Python] Issues re: Python API 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: runtime component: tests Issues re: Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants