Skip to main content
-1 votes
1 answer
102 views

I have data from a device that is being captured in Python as arrays and then sent to a C++ binding to speed up some post processing that must happen to format the data properly and convert into a ...
inventi's user avatar
  • 23
0 votes
1 answer
69 views

I made a minimal example that crashes. For the crash it is required that the torch libraries are linked. I made sure that GLIBCXX_USE_CXX11_ABI=0 for all 3 components. Setup is Ubuntu, g++, C++17. Any ...
mzw's user avatar
  • 11
0 votes
0 answers
96 views

My C++ code is like this #include <torch/torch.h> #include <torch/script.h> #include <torch/autograd/profiler.h> and my CMakeLists.txt is writen like this ...
Michael zhang's user avatar
0 votes
1 answer
25k views

Im using the latest LibTorch with CUDA 12.6 installed on Windows 10 Libtorch is showing CUDA is available, however, I get this error when I try to use device = torch::Device(torch::kCUDA, 0); ...
Mich's user avatar
  • 3,724
3 votes
0 answers
121 views

In the image below I am running the same PPO minimalist project. On the right side is the original code in python with PyTorch in VSCode. On the left side is the converted code in C++ with LibTorch in ...
Mich's user avatar
  • 3,724
3 votes
0 answers
81 views

I am currently working on optimizing PyTorch code running on CPU. On CUDA, you can write fused multiple operators into specialized kernels to reduce memory transfers, avoid intermediate data ...
Green 绿色's user avatar
  • 3,353
1 vote
0 answers
129 views

Environment Libtorch 2.5.0.dev (latest nightly) (built with CUDA 12.4) CUDA 12.4 TensorRT 10.1.0.27 PyTorch 2.4.0+cu124 Torch-TensorRT 2.4.0 Python 3.12.8 Windows 10 Compile Torch-TensorRT with ...
Mmmmyy's user avatar
  • 11
1 vote
0 answers
127 views

I am using libtorch in c++. In python, torch.jit.trace function exists and works fine. However, torch::jit::trace does not work in libtorch. It said there is no "trace" member in namespace ...
BIS steve's user avatar
-2 votes
1 answer
163 views

I am going along the pytorch api tutorial and I get the following error ld: unknown options: --no-as-needed --as-needed --no-as-needed --as-needed c++: error: linker command failed with exit code 1 (...
dimicorn's user avatar
1 vote
0 answers
46 views

I'm getting a segmentation fault when I'm trying to copy memory from gst buffer to torch tensor. Here is code. I'll mark where the segfault originates from: static GstPadProbeReturn on_probe( ...
vizn's user avatar
  • 26
1 vote
0 answers
116 views

The below code is able to learn the generic pattern and it is able to predict as expected: torch::manual_seed(42); torch::nn::Sequential net( torch::nn::Linear(300, 301), torch::nn::...
Uriel Herrera's user avatar
2 votes
1 answer
207 views

I'm encountering an issue when trying to load a TorchScript model in my C++ application using LibTorch. The model loads and works fine in debug mode, but I get an exception when switching to release ...
Nimasha Konara's user avatar
1 vote
1 answer
829 views

In LibTorch 2.0.1 I was able to use the library without installing it (download library and set CMAKE_PREFIX_PATH to allow CMake to find the library). Using LibTorch 2.5.1 and CUDA 12.6 I have to ...
Uriel Herrera's user avatar
1 vote
0 answers
774 views

My goal is to build PyTorch from source for use in image generation AI workflows (e.g., ComfyUI). I would like to request guidance on the correct method to build PyTorch 2.5.1 (both libtorch and the ...
user28412398's user avatar
1 vote
0 answers
192 views

I'm trying to load a traced PyTorch model in C++ using LibTorch but encountering a std::bad_alloc error. I've set up a minimal example to demonstrate the issue. The Problem: When running my C++ ...
works's user avatar
  • 125

15 30 50 per page
1
2 3 4 5
21