nvSample.zip (17.8 KB)
Just run ./sampleLibtorch
Source code is this-
int main()
{
try {
std::cout << torch::cuda::is_available() << std::endl;
torch::Tensor tensor = at::tensor({ -1, 1 }, at::kCUDA);
}
catch (std::exception& ex) {
std::cout << ex.what() << std::endl;
}
}