Skip to content

Conversation

Gasoonjia
Copy link
Contributor

@Gasoonjia Gasoonjia commented Oct 8, 2025

Stack from ghstack (oldest at bottom):

This diff introduces CUDA streams into the Executorch runtime backend. The changes include:

  • Adding CUDA stream support to the cuda_backend.cpp file
  • Including the cuda_runtime.h header file in cuda_backend.cpp
  • Adding a void* cuda_stream field to the AOTInductorModelContainer struct in aoti_model_container.h to store the CUDA stream
  • Defining a new macro ET_CHECK_OR_LOG in log.h to check a condition and log an error message if the condition is false.

Differential Revision: D84128173

This diff introduces CUDA streams into the Executorch runtime backend. The changes include:

* Adding CUDA stream support to the `cuda_backend.cpp` file
* Including the `cuda_runtime.h` header file in `cuda_backend.cpp`
* Adding a `void* cuda_stream` field to the `AOTInductorModelContainer` struct in `aoti_model_container.h` to store the CUDA stream
* Defining a new macro `ET_CHECK_OR_LOG` in `log.h` to check a condition and log an error message if the condition is false.

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

[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/14903

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

⏳ No Failures, 17 Pending

As of commit 2edb21a with merge base 0142a1a (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.

Comment on lines 184 to 197

/**
* Check a condition and log an error message if the condition is false.
*
* @param[in] _condition The condition to check.
* @param[in] _format Log message format string.
*/
#define ET_CHECK_OR_LOG(_condition, _format, ...) \
do { \
if (!(_condition)) { \
ET_LOG(Error, _format, ##__VA_ARGS__); \
} \
} while (0)

Copy link
Contributor

Choose a reason for hiding this comment

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

Make it explicit that we are logging at Error level. Maybe ET_CHECK_OR_LOG_ERROR? The other thing you can do is let this macro take a logging level.

This diff introduces CUDA streams into the Executorch runtime backend. The changes include:

* Adding CUDA stream support to the `cuda_backend.cpp` file
* Including the `cuda_runtime.h` header file in `cuda_backend.cpp`
* Adding a `void* cuda_stream` field to the `AOTInductorModelContainer` struct in `aoti_model_container.h` to store the CUDA stream
* Defining a new macro `ET_CHECK_OR_LOG` in `log.h` to check a condition and log an error message if the condition is false.

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

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

This diff introduces CUDA streams into the Executorch runtime backend. The changes include:

* Adding CUDA stream support to the `cuda_backend.cpp` file
* Including the `cuda_runtime.h` header file in `cuda_backend.cpp`
* Adding a `void* cuda_stream` field to the `AOTInductorModelContainer` struct in `aoti_model_container.h` to store the CUDA stream
* Defining a new macro `ET_CHECK_OR_LOG` in `log.h` to check a condition and log an error message if the condition is false.
ghstack-source-id: 314914426
@exported-using-ghexport

Differential Revision: [D84128173](https://our.internmc.facebook.com/intern/diff/D84128173/)
This diff introduces CUDA streams into the Executorch runtime backend. The changes include:

* Adding CUDA stream support to the `cuda_backend.cpp` file
* Including the `cuda_runtime.h` header file in `cuda_backend.cpp`
* Adding a `void* cuda_stream` field to the `AOTInductorModelContainer` struct in `aoti_model_container.h` to store the CUDA stream
* Defining a new macro `ET_CHECK_OR_LOG` in `log.h` to check a condition and log an error message if the condition is false.

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

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

This diff introduces CUDA streams into the Executorch runtime backend. The changes include:

* Adding CUDA stream support to the `cuda_backend.cpp` file
* Including the `cuda_runtime.h` header file in `cuda_backend.cpp`
* Adding a `void* cuda_stream` field to the `AOTInductorModelContainer` struct in `aoti_model_container.h` to store the CUDA stream
* Defining a new macro `ET_CHECK_OR_LOG` in `log.h` to check a condition and log an error message if the condition is false.
ghstack-source-id: 314915602
@exported-using-ghexport

Differential Revision: [D84128173](https://our.internmc.facebook.com/intern/diff/D84128173/)
This diff introduces CUDA streams into the Executorch runtime backend. The changes include:

* Adding CUDA stream support to the `cuda_backend.cpp` file
* Including the `cuda_runtime.h` header file in `cuda_backend.cpp`
* Adding a `void* cuda_stream` field to the `AOTInductorModelContainer` struct in `aoti_model_container.h` to store the CUDA stream
* Defining a new macro `ET_CHECK_OR_LOG` in `log.h` to check a condition and log an error message if the condition is false.

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

[ghstack-poisoned]
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