memset-vec-unaligned-erms.S signal SIGSEGV segmentation fault, by libtorch API

Sorry, but I don’t fully understand the comment.
Based on the backtrace it seems you are using qpOASES for the matmul calls and call them from libtorch, which is then causing the segfault.
Your current (working) example doesn’t show any qpOASES usage, so I still think the interaction or qpOASES itself is causing the issue.