Skip to content

Conversation

Gasoonjia
Copy link
Contributor

@Gasoonjia Gasoonjia commented Oct 8, 2025

Stack from ghstack (oldest at bottom):

Summary

This diff introduces shim layers for CudaGuard and CudaStreamGuard in the Executorch project, which will be further used by cuda-AOTI models for stream/cuda control. The changes include:

  • Adding a new source file runtime/shims/cuda_guard.cpp and header file runtime/shims/cuda_guard.h to the CMakeLists.txt and TARGETS files.
  • Creating a new test target aoti_torch_cuda_guard in the targets.bzl file.
  • Defining the cuda_guard.h header file with the necessary includes, namespace definitions, and function declarations.

These changes aim to provide a shim layer for CudaGuard, which is responsible for handling CUDA-related functionality in the Executorch runtime. The shim layer will allow for better modularity and maintainability of the codebase.

Differential Revision: D84126634

### Summary

This diff introduces shim layers for CudaGuard and CudaStreamGuard in the Executorch project, which will be further used by cuda-AOTI models for stream/cuda control. The changes include:

*   Adding a new source file `runtime/shims/cuda_guard.cpp` and header file `runtime/shims/cuda_guard.h` to the `CMakeLists.txt` and `TARGETS` files.
*   Creating a new test target `aoti_torch_cuda_guard` in the `targets.bzl` file.
*   Defining the `cuda_guard.h` header file with the necessary includes, namespace definitions, and function declarations.

These changes aim to provide a shim layer for CudaGuard, which is responsible for handling CUDA-related functionality in the Executorch runtime. The shim layer will allow for better modularity and maintainability of the codebase.

Differential Revision: [D84126634](https://our.internmc.facebook.com/intern/diff/D84126634/)

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Oct 8, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/14902

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

✅ No Failures

As of commit 01c4cfe with merge base f32e9fc (image):
💚 Looks good so far! There are no failures yet. 💚

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

Copy link

github-actions bot commented Oct 8, 2025

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

### Summary

This diff introduces shim layers for CudaGuard and CudaStreamGuard in the Executorch project, which will be further used by cuda-AOTI models for stream/cuda control. The changes include:

*   Adding a new source file `runtime/shims/cuda_guard.cpp` and header file `runtime/shims/cuda_guard.h` to the `CMakeLists.txt` and `TARGETS` files.
*   Creating a new test target `aoti_torch_cuda_guard` in the `targets.bzl` file.
*   Defining the `cuda_guard.h` header file with the necessary includes, namespace definitions, and function declarations.

These changes aim to provide a shim layer for CudaGuard, which is responsible for handling CUDA-related functionality in the Executorch runtime. The shim layer will allow for better modularity and maintainability of the codebase.

Differential Revision: [D84126634](https://our.internmc.facebook.com/intern/diff/D84126634/)

[ghstack-poisoned]
Gasoonjia added a commit that referenced this pull request Oct 8, 2025
Pull Request resolved: #14902

### Summary

This diff introduces shim layers for CudaGuard and CudaStreamGuard in the Executorch project, which will be further used by cuda-AOTI models for stream/cuda control. The changes include:

*   Adding a new source file `runtime/shims/cuda_guard.cpp` and header file `runtime/shims/cuda_guard.h` to the `CMakeLists.txt` and `TARGETS` files.
*   Creating a new test target `aoti_torch_cuda_guard` in the `targets.bzl` file.
*   Defining the `cuda_guard.h` header file with the necessary includes, namespace definitions, and function declarations.

These changes aim to provide a shim layer for CudaGuard, which is responsible for handling CUDA-related functionality in the Executorch runtime. The shim layer will allow for better modularity and maintainability of the codebase.
ghstack-source-id: 314907961
@exported-using-ghexport

Differential Revision: [D84126634](https://our.internmc.facebook.com/intern/diff/D84126634/)
### Summary

This diff introduces shim layers for CudaGuard and CudaStreamGuard in the Executorch project, which will be further used by cuda-AOTI models for stream/cuda control. The changes include:

*   Adding a new source file `runtime/shims/cuda_guard.cpp` and header file `runtime/shims/cuda_guard.h` to the `CMakeLists.txt` and `TARGETS` files.
*   Creating a new test target `aoti_torch_cuda_guard` in the `targets.bzl` file.
*   Defining the `cuda_guard.h` header file with the necessary includes, namespace definitions, and function declarations.

These changes aim to provide a shim layer for CudaGuard, which is responsible for handling CUDA-related functionality in the Executorch runtime. The shim layer will allow for better modularity and maintainability of the codebase.

Differential Revision: [D84126634](https://our.internmc.facebook.com/intern/diff/D84126634/)

[ghstack-poisoned]
Gasoonjia added a commit that referenced this pull request Oct 8, 2025
Pull Request resolved: #14902

### Summary

This diff introduces shim layers for CudaGuard and CudaStreamGuard in the Executorch project, which will be further used by cuda-AOTI models for stream/cuda control. The changes include:

*   Adding a new source file `runtime/shims/cuda_guard.cpp` and header file `runtime/shims/cuda_guard.h` to the `CMakeLists.txt` and `TARGETS` files.
*   Creating a new test target `aoti_torch_cuda_guard` in the `targets.bzl` file.
*   Defining the `cuda_guard.h` header file with the necessary includes, namespace definitions, and function declarations.

These changes aim to provide a shim layer for CudaGuard, which is responsible for handling CUDA-related functionality in the Executorch runtime. The shim layer will allow for better modularity and maintainability of the codebase.
ghstack-source-id: 314915363
@exported-using-ghexport

Differential Revision: [D84126634](https://our.internmc.facebook.com/intern/diff/D84126634/)
### Summary

This diff introduces shim layers for CudaGuard and CudaStreamGuard in the Executorch project, which will be further used by cuda-AOTI models for stream/cuda control. The changes include:

*   Adding a new source file `runtime/shims/cuda_guard.cpp` and header file `runtime/shims/cuda_guard.h` to the `CMakeLists.txt` and `TARGETS` files.
*   Creating a new test target `aoti_torch_cuda_guard` in the `targets.bzl` file.
*   Defining the `cuda_guard.h` header file with the necessary includes, namespace definitions, and function declarations.

These changes aim to provide a shim layer for CudaGuard, which is responsible for handling CUDA-related functionality in the Executorch runtime. The shim layer will allow for better modularity and maintainability of the codebase.

Differential Revision: [D84126634](https://our.internmc.facebook.com/intern/diff/D84126634/)

[ghstack-poisoned]
### Summary

This diff introduces shim layers for CudaGuard and CudaStreamGuard in the Executorch project, which will be further used by cuda-AOTI models for stream/cuda control. The changes include:

*   Adding a new source file `runtime/shims/cuda_guard.cpp` and header file `runtime/shims/cuda_guard.h` to the `CMakeLists.txt` and `TARGETS` files.
*   Creating a new test target `aoti_torch_cuda_guard` in the `targets.bzl` file.
*   Defining the `cuda_guard.h` header file with the necessary includes, namespace definitions, and function declarations.

These changes aim to provide a shim layer for CudaGuard, which is responsible for handling CUDA-related functionality in the Executorch runtime. The shim layer will allow for better modularity and maintainability of the codebase.

Differential Revision: [D84126634](https://our.internmc.facebook.com/intern/diff/D84126634/)

[ghstack-poisoned]
### Summary

This diff introduces shim layers for CudaGuard and CudaStreamGuard in the Executorch project, which will be further used by cuda-AOTI models for stream/cuda control. The changes include:

*   Adding a new source file `runtime/shims/cuda_guard.cpp` and header file `runtime/shims/cuda_guard.h` to the `CMakeLists.txt` and `TARGETS` files.
*   Creating a new test target `aoti_torch_cuda_guard` in the `targets.bzl` file.
*   Defining the `cuda_guard.h` header file with the necessary includes, namespace definitions, and function declarations.

These changes aim to provide a shim layer for CudaGuard, which is responsible for handling CUDA-related functionality in the Executorch runtime. The shim layer will allow for better modularity and maintainability of the codebase.

Differential Revision: [D84126634](https://our.internmc.facebook.com/intern/diff/D84126634/)

[ghstack-poisoned]
@meta-codesync meta-codesync bot merged commit 0377c9a into gh/gasoonjia/47/base Oct 9, 2025
136 of 137 checks passed
@meta-codesync meta-codesync bot deleted the gh/gasoonjia/47/head branch October 9, 2025 05:04
@meta-codesync meta-codesync bot temporarily deployed to cherry-pick-bot October 9, 2025 05:04 Inactive
Gasoonjia added a commit that referenced this pull request Oct 9, 2025
This PR was created by the merge bot to help merge the original PR into
the main branch.
ghstack PR number: #14902 by
@Gasoonjia
^ Please use this as the source of truth for the PR details, comments,
and reviews
ghstack PR base:
https://github.com/pytorch/executorch/tree/gh/gasoonjia/47/base
ghstack PR head:
https://github.com/pytorch/executorch/tree/gh/gasoonjia/47/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/main
Merge bot PR head:
https://github.com/pytorch/executorch/tree/gh/gasoonjia/47/orig
Differential Revision:
[D84126634](https://our.internmc.facebook.com/intern/diff/D84126634/)
@diff-train-skip-merge

---------

Co-authored-by: gasoonjia <gasoonjia@icloud.com>
Co-authored-by: Gasoonjia <gasoonjia@meta.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants