Skip to content

Commit aaac0e9

Browse files
committed
Update on "introduce shim layers for cudaguard and cudastreamguard"
### 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]
1 parent 986f7da commit aaac0e9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

backends/aoti/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,7 @@ target_compile_options(aoti_common PUBLIC -fexceptions -frtti -fPIC)
4141
target_link_options(aoti_common PUBLIC -Wl,--export-dynamic)
4242

4343
# Link against PyTorch libraries and standard libraries
44-
target_link_libraries(
45-
aoti_common
46-
PUBLIC extension_tensor ${CMAKE_DL_LIBS}
47-
)
44+
target_link_libraries(aoti_common PUBLIC extension_tensor ${CMAKE_DL_LIBS})
4845
executorch_target_link_options_shared_lib(aoti_common)
4946

5047
install(

0 commit comments

Comments
 (0)