-
Notifications
You must be signed in to change notification settings - Fork 689
refactor cuda_backend.cpp #14904
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
refactor cuda_backend.cpp #14904
Conversation
This diff does a comprehensive refactor on cuda_backend.cpp. Two main points: 1. Reuse ExecuTorch standard macros (ET_CHECK_OR_RETURN_ERROR and others) to replaces exiting if..else + ET_LOG branches 2. Introduced LOAD_SYMBOL macro to concentrate the symbol loading pipeline. Differential Revision: [D84135844](https://our.internmc.facebook.com/intern/diff/D84135844/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/14904
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit f60bb93 with merge base f32e9fc ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
// Remove the temporary shared library file | ||
if (!handle->so_path.empty()) { | ||
std::error_code remove_error; | ||
std::filesystem::remove(handle->so_path, remove_error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't delete this line
This diff does a comprehensive refactor on cuda_backend.cpp. Two main points: 1. Reuse ExecuTorch standard macros (ET_CHECK_OR_RETURN_ERROR and others) to replaces exiting if..else + ET_LOG branches 2. Introduced LOAD_SYMBOL macro to concentrate the symbol loading pipeline. Differential Revision: [D84135844](https://our.internmc.facebook.com/intern/diff/D84135844/) [ghstack-poisoned]
Pull Request resolved: #14904 This diff does a comprehensive refactor on cuda_backend.cpp. Two main points: 1. Reuse ExecuTorch standard macros (ET_CHECK_OR_RETURN_ERROR and others) to replaces exiting if..else + ET_LOG branches 2. Introduced LOAD_SYMBOL macro to concentrate the symbol loading pipeline. ghstack-source-id: 314877738 @exported-using-ghexport Differential Revision: [D84135844](https://our.internmc.facebook.com/intern/diff/D84135844/)
This diff does a comprehensive refactor on cuda_backend.cpp. Two main points: 1. Reuse ExecuTorch standard macros (ET_CHECK_OR_RETURN_ERROR and others) to replaces exiting if..else + ET_LOG branches 2. Introduced LOAD_SYMBOL macro to concentrate the symbol loading pipeline. Differential Revision: [D84135844](https://our.internmc.facebook.com/intern/diff/D84135844/) [ghstack-poisoned]
} | ||
ET_CHECK_OR_RETURN_ERROR( | ||
aoti_cuda_buffer.ok(), | ||
aoti_cuda_buffer.error(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This failed to compile because it's returning a AOTI error not a ET error
This diff does a comprehensive refactor on cuda_backend.cpp. Two main points: 1. Reuse ExecuTorch standard macros (ET_CHECK_OR_RETURN_ERROR and others) to replaces exiting if..else + ET_LOG branches 2. Introduced LOAD_SYMBOL macro to concentrate the symbol loading pipeline. Differential Revision: [D84135844](https://our.internmc.facebook.com/intern/diff/D84135844/) [ghstack-poisoned]
This diff does a comprehensive refactor on cuda_backend.cpp. Two main points: 1. Reuse ExecuTorch standard macros (ET_CHECK_OR_RETURN_ERROR and others) to replaces exiting if..else + ET_LOG branches 2. Introduced LOAD_SYMBOL macro to concentrate the symbol loading pipeline. Differential Revision: [D84135844](https://our.internmc.facebook.com/intern/diff/D84135844/) [ghstack-poisoned]
This diff does a comprehensive refactor on cuda_backend.cpp. Two main points: 1. Reuse ExecuTorch standard macros (ET_CHECK_OR_RETURN_ERROR and others) to replaces exiting if..else + ET_LOG branches 2. Introduced LOAD_SYMBOL macro to concentrate the symbol loading pipeline. Differential Revision: [D84135844](https://our.internmc.facebook.com/intern/diff/D84135844/) [ghstack-poisoned]
This diff does a comprehensive refactor on cuda_backend.cpp. Two main points: 1. Reuse ExecuTorch standard macros (ET_CHECK_OR_RETURN_ERROR and others) to replaces exiting if..else + ET_LOG branches 2. Introduced LOAD_SYMBOL macro to concentrate the symbol loading pipeline. Differential Revision: [D84135844](https://our.internmc.facebook.com/intern/diff/D84135844/) [ghstack-poisoned]
This diff does a comprehensive refactor on cuda_backend.cpp. Two main points: 1. Reuse ExecuTorch standard macros (ET_CHECK_OR_RETURN_ERROR and others) to replaces exiting if..else + ET_LOG branches 2. Introduced LOAD_SYMBOL macro to concentrate the symbol loading pipeline. Differential Revision: [D84135844](https://our.internmc.facebook.com/intern/diff/D84135844/) [ghstack-poisoned]
6418645
into
gh/gasoonjia/49/base
This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #14904 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/49/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/gasoonjia/49/head Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/gasoonjia/47/orig Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/gasoonjia/49/orig Differential Revision: [D84135844](https://our.internmc.facebook.com/intern/diff/D84135844/) @diff-train-skip-merge --------- Co-authored-by: gasoonjia <gasoonjia@icloud.com>
Stack from ghstack (oldest at bottom):
This diff does a comprehensive refactor on cuda_backend.cpp. Two main points:
Differential Revision: D84135844