Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
C++ neural network backend development

Marcel shyney7

💭
C++ neural network backend development
View GitHub Profile
@shyney7
shyney7 / Eigen Cheat sheet
Created May 25, 2020 — forked from gocarlos/Eigen Cheat sheet
Cheat sheet for the linear algebra library Eigen: http://eigen.tuxfamily.org/
View Eigen Cheat sheet
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.
View comperr-lib-in-QNXenv.md
marcel@ubuntu:~/Documents/libtorch-cross-RTOS-test/build$ source ~/qnx700/qnxsdp-env.sh 
QNX_HOST=/home/marcel/qnx700/host/linux/x86_64
QNX_TARGET=/home/marcel/qnx700/target/qnx7
MAKEFLAGS=-I/home/marcel/qnx700/target/qnx7/usr/include
marcel@ubuntu:~/Documents/libtorch-cross-RTOS-test/build$ cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/qnx_7.0.0_linux_x86_64.cmake ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /home/marcel/qnx700/host/linux/x86_64/usr/bin/ntox86_64-gcc
-- Check for working C compiler: /home/marcel/qnx700/host/linux/x86_64/usr/bin/ntox86_64-gcc -- works
@shyney7
shyney7 / Libtorch_crosscomp_error_with_-stdlib=libstdc++_flag
Created May 12, 2020
Libtorch cross-compiling for QNX errors (with -stdlib=libstdc++ flag)
View Libtorch_crosscomp_error_with_-stdlib=libstdc++_flag
marcel@ubuntu:~/Documents/libtorch_cross_test/build$ cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/qnx_7.0.0_linux_x86_64.cmake ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /home/marcel/qnx700/host/linux/x86_64/usr/bin/ntox86_64-gcc
-- Check for working C compiler: /home/marcel/qnx700/host/linux/x86_64/usr/bin/ntox86_64-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/marcel/qnx700/host/linux/x86_64/usr/bin/ntox86_64-c++
View Libtorch cross-compilation error QNX
marcel@ubuntu:~/Documents/libtorch_cross_test/build$ source ~/qnx700/qnxsdp-env.sh
QNX_HOST=/home/marcel/qnx700/host/linux/x86_64
QNX_TARGET=/home/marcel/qnx700/target/qnx7
MAKEFLAGS=-I/home/marcel/qnx700/target/qnx7/usr/include
marcel@ubuntu:~/Documents/libtorch_cross_test/build$ make
[ 50%] Building CXX object CMakeFiles/example-app.dir/main.cpp.o
In file included from /home/marcel/Documents/libs/libtorch/include/c10/core/Allocator.h:4:0,
from /home/marcel/Documents/libs/libtorch/include/ATen/ATen.h:3,
from /home/marcel/Documents/libs/libtorch/include/torch/csrc/api/include/torch/types.h:3,
from /home/marcel/Documents/libs/libtorch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
View Libtorch_compiler_error_QNX
marcel@ubuntu:~/Documents/libtorch_cross_test/build$ make
Scanning dependencies of target example-app
[ 50%] Building CXX object CMakeFiles/example-app.dir/main.cpp.o
In file included from /home/marcel/qnx700/target/qnx7/usr/include/c++/v1/algorithm:628:0,
from /home/marcel/qnx700/target/qnx7/usr/include/c++/v1/string:439,
from /home/marcel/qnx700/target/qnx7/usr/include/c++/v1/__locale:15,
from /home/marcel/qnx700/target/qnx7/usr/include/c++/v1/ios:216,
from /home/marcel/qnx700/target/qnx7/usr/include/c++/v1/iostream:38,
from /home/marcel/Documents/libtorch_cross_test/main.cpp:1:
/home/marcel/qnx700/target/qnx7/usr/include/c++/v1/memory: In instantiation of 'struct std::__1::allocator_traits<std::__1::allocator_traits<std::__1::allocator<std::__1::pair<c10::IValue, c10::IValue> > >::rebind_alloc<ska_ordered::detailv3::sherwood_v3_entry<std::__1::pair<c10::IValue, c10::IValue> > > >':
View CMakeOutput.log
The target system is: QNX - - x86_64
The host system is: Linux - 5.3.0-51-generic - x86_64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /home/marcel/qnx700/host/linux/x86_64/usr/bin/ntox86_64-gcc
Build flags:
Id flags:
The output was:
0