main
h 17 lines 548 Bytes
Raw
1 #pragma once
2
3 // Shared TORCH_UTILS_CHECK across both libtorch stable and unstable source
4 // files. Keep this header free of CUTLASS/CUTE so attention/quant headers can
5 // use it.
6 //
7 // If TORCH_TARGET_VERSION is defined, we are building _C_stable_libtorch.so so
8 // use STD_TORCH_CHECK via header-only.
9 // Otherwise, use TORCH_CHECK via torch/all.h.
10
11 #ifdef TORCH_TARGET_VERSION
12 #include <torch/headeronly/util/Exception.h>
13 #define TORCH_UTILS_CHECK STD_TORCH_CHECK
14 #else
15 #include <torch/all.h>
16 #define TORCH_UTILS_CHECK TORCH_CHECK
17 #endif