F:/sigma/sigma/3rdparty/libtorch/include/c10/core/DynamicCast.h: In function ‘dest_t c10::fetch_and_cast(c10::ScalarType, const void*) [with dest_t = c10::qint8]’:
F:/sigma/sigma/3rdparty/libtorch/include/c10/macros/Macros.h:401:5: error: ‘__assert_fail’ was not declared in this scope
401 | __assert_fail(
| ^~~~~~~~~~~~~
Codes:
#include
#include <torch/script.h>
using namespace std;
int main() {
torch::Tensor tensor = torch::rand({3, 3});
torch::Tensor tensor1 = torch::zeros({5, 5});
cout << tensor << endl << tensor1 << endl;
return 0;
}
Windows11
libtorch-2.4.0-cpu
How to compiler this file?