ext/torch/utils.h in torch-rb-0.10.0 vs ext/torch/utils.h in torch-rb-0.10.1

- old
+ new

@@ -1,8 +1,15 @@ #pragma once +#include <torch/torch.h> + #include <rice/rice.hpp> #include <rice/stl.hpp> + +static_assert( + TORCH_VERSION_MAJOR == 1 && TORCH_VERSION_MINOR == 11, + "Incompatible LibTorch version" +); // TODO find better place inline void handle_error(torch::Error const & ex) { throw Rice::Exception(rb_eRuntimeError, ex.what_without_backtrace()); }