You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I needed it for pytorch compilation. Spent half a day trying to compile this, as dependency. Tips for Termux users only:
If you're compiling this code on Termux and encounter an error about the missing 'unistd.h' file, you might need to install the 'ndk-sysroot'. It has it natively, one of very few apt packages that does not get installed to /opt or .local/lib
Remove this code security cruft first, as it gets stuck eith smth Google. Yes. Thus :
alias cmakeinstall='rm CMakeCache.txt && echo "Removing silly Werror 🪲 directives en masse..." & time find . -type f -exec sed -i "s/-Werror//g" {} \; && export CFLAGS="-fuse-ld=lld -pthread -g -march=armv8-a -mtune=cortex-a53 -Wall -Wextra" && echo "Starting compilation 👩💻 proper... "&& cmake -DCMAKE_INSTALL_PREFIX=$PREFIX . && time make -j4 && make install'
is my newest one liner.
Ref:
~/downloads/pthreadpool $ uname -a Linux localhost 4.14.186+ #1 SMP PREEMPT Thu Mar 17 16:28:22 CST 2022 aarch64 Android ~/downloads/pthreadpool $
with : gcc -o test4 test4.c -pthread -lpthreadpool :
~/.../pytorch/build $ ./test4 Hello from task 3 Hello from task 4 Hello from task 5 Hello from task 2 Hello from task 1 Hello from task 9 Hello from task 7 Hello from task 0 Hello from task 6 Hello from task 8 ~/.../pytorch/build $
...
The text was updated successfully, but these errors were encountered:
And this is needed: sed -i '3i set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=unused-but-set-variable")' CMakeLists.txt
To covert this fatal error into warning only:
/data/data/com.termux/files/home/downloads/pthreadpool/googlebenchmark-source/src/complexity.cc:85:10: warning: variable 'sigma_gn' set but not used [-Wunused-but-set-variable]
85 | double sigma_gn = 0.0;
I needed it for pytorch compilation. Spent half a day trying to compile this, as dependency. Tips for Termux users only:
is my newest one liner.
Ref:
PS. You may test it with:
with :
gcc -o test4 test4.c -pthread -lpthreadpool
:~/.../pytorch/build $ ./test4 Hello from task 3 Hello from task 4 Hello from task 5 Hello from task 2 Hello from task 1 Hello from task 9 Hello from task 7 Hello from task 0 Hello from task 6 Hello from task 8 ~/.../pytorch/build $
...
The text was updated successfully, but these errors were encountered: