diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2024-11-25 21:57:48 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-25 21:57:48 -0500 |
| commit | e6cf93e3e638cb981a9be392a2f48ea06acd4e3f (patch) | |
| tree | c1eda91f26dae8b1a60ac00ca12d90d4c67ad8a9 /prelude | |
| parent | d282701ba76e9883d2b7be39ee614fe3bb4f5165 (diff) | |
Fix issue with slang-embed & include ordering (#5680)
* Fix issue with slang-embed & include ordering
* Update CMakeLists.txt
Diffstat (limited to 'prelude')
| -rw-r--r-- | prelude/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | prelude/slang-torch-prelude.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/prelude/CMakeLists.txt b/prelude/CMakeLists.txt index 67dc89d99..3b0e2cf46 100644 --- a/prelude/CMakeLists.txt +++ b/prelude/CMakeLists.txt @@ -11,7 +11,9 @@ foreach(input ${prelude_headers}) set(output "${CMAKE_CURRENT_BINARY_DIR}/${input_name}.cpp") add_custom_command( OUTPUT ${output} - COMMAND slang-embed "${input}" ${output} + COMMAND + slang-embed "${input}" "${CMAKE_CURRENT_LIST_DIR}/../include" + ${output} DEPENDS ${input} slang-embed VERBATIM ) diff --git a/prelude/slang-torch-prelude.h b/prelude/slang-torch-prelude.h index d303c1045..8ece877b6 100644 --- a/prelude/slang-torch-prelude.h +++ b/prelude/slang-torch-prelude.h @@ -1,10 +1,13 @@ // Prelude for PyTorch cpp binding. +// clang-format off +#include <torch/extension.h> +// clang-format on + #include <ATen/cuda/CUDAContext.h> #include <ATen/cuda/CUDAUtils.h> #include <stdexcept> #include <string> -#include <torch/extension.h> #include <vector> #ifdef SLANG_LLVM |
