#ifndef TRITON_TVM_FFI_MACRO_H_ #define TRITON_TVM_FFI_MACRO_H_ #include "exception.h" #if defined(__GNUC__) || defined(__clang__) #define TRITON_TVM_FFI_INLINE __attribute__((always_inline)) inline #endif #define UNLIKELY(cond) __builtin_expect((cond), 0) #define CUDA_CHECK(code) \ do { \ if (UNLIKELY((code) != CUDA_SUCCESS)) { \ throw triton_tvm_ffi::CUDAException(code); \ } \ } while (false) #endif