Skip to content

Instantly share code, notes, and snippets.

@lissyx
lissyx / gist:28c1a0092d9a1ea73d786381682a91be
Last active January 6, 2017 14:13
cross build libtensorflow-core rpi3 notes
cross-build protobuf:
- git clone https://github.com/raspberrypi/tools
- first build for linux host system, we need matching protoc
- mkdir /home/alex/codaz/Mozilla/DeepSpeech/tensorflow/protobuf
- CC=gcc-4.8 CXX=g++-4.8 ./configure --prefix=$HOME/codaz/Mozilla/DeepSpeech/tensorflow/protobuf/
- CC=gcc-4.8 CXX=g++-4.8 make -j8 && CC=gcc-4.8 CXX=g++-4.8 make install
- then cross-build for rpi3
- CC=/home/alex/codaz/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc CXX=/home/alex/codaz/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ ./configure --host=arm-linux-gnueabihf --with-sysroot=/home/alex/codaz/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/ --with-protoc=$HOME/codaz/Mozilla/DeepSpeech/tensorflow/protobuf/bin/protoc --prefix=$HOME/codaz/Mozilla/DeepSpeech/tensorflow/rpi3/
- make -j8 && make -j8 install
@lissyx
lissyx / rpi3-arm64.patch
Created August 7, 2017 19:35
RPi3 ARMv8
diff --git a/tensorflow/core/platform/default/build_config.bzl b/tensorflow/core/platform/default/build_config.bzl
index 48ef8dfa8..be831d5c0 100644
--- a/tensorflow/core/platform/default/build_config.bzl
+++ b/tensorflow/core/platform/default/build_config.bzl
@@ -8,7 +8,7 @@ load("//tensorflow:tensorflow.bzl", "if_not_mobile")
WITH_GCP_SUPPORT = False
WITH_HDFS_SUPPORT = False
WITH_XLA_SUPPORT = False
-WITH_JEMALLOC = True
+WITH_JEMALLOC = False
@lissyx
lissyx / multistrap_arm64.conf
Created August 7, 2017 19:37
Multistrap ARM64 Debian Sid
[General]
arch=arm64
noauth=true
unpack=true
debootstrap=Debian
aptsources=Debian
cleanup=true
[Debian]
packages=apt systemd systemd-sysv udev kmod locales sudo netbase net-tools ethtool iproute iputils-ping ifupdown dhcpcd5 firmware-brcm80211 wpasupplicant ssh avahi-daemon ntp libsox-dev libgoogle-perftools-dev
--- tf/bazel-out/local_linux-opt/bin/tensorflow/stream_executor/_objs/stream_executor_impl/tensorflow/stream_executor/blas.pic.o.ckd 2018-01-24 16:34:12.000000000 +0100
+++ ds/bazel-out/local_linux-opt/bin/tensorflow/stream_executor/_objs/stream_executor_impl/tensorflow/stream_executor/blas.pic.o.ckd 2018-01-24 17:28:47.000000000 +0100
@@ -1203,1061 +1203,1061 @@
DECLAREDINCLUDESRCS: tensorflow/core/platform/thread_annotations.h
DECLAREDINCLUDESRCS: tensorflow/core/platform/variant_coding.h
DECLAREDINCLUDESRCS: tensorflow/core/platform/windows/cpu_info.h
-DECLAREDINCLUDESRCS: bazel-out/local_linux-opt/genfiles/external/local_config_cuda/cuda/cuda/include/nppi_support_functions.h
-DECLAREDINCLUDESRCS: bazel-out/local_linux-opt/genfiles/external/local_config_cuda/cuda/cuda/include/device_atomic_functions.h
-DECLAREDINCLUDESRCS: bazel-out/local_linux-opt/genfiles/external/local_config_cuda/cuda/cuda/include/sm_60_atomic_functions.hpp
-DECLAREDINCLUDESRCS: bazel-out/local_linux-opt/genfiles/external/local_conf
@lissyx
lissyx / bazel.patch
Created January 24, 2018 18:16
hacking weird cuda rebuilds
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java
index 3559fffde..37c483ce9 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java
@@ -1111,10 +1111,30 @@ public class CppCompileAction extends AbstractAction
@Override
public String computeKey() {
+ // ".ckd" Compute Key Debug
+ PrintWriter computeKeyDebugWriter = null;
@lissyx
lissyx / syceron.py
Created March 26, 2018 16:29
Syceron
#!/usr/bin/env python3
import sys
from xml.dom.pulldom import START_ELEMENT, CHARACTERS, END_ELEMENT, parse
from xml.dom.minidom import Element, Text
doc = parse(sys.argv[1])
indent_level = 0
visited = []
@lissyx
lissyx / gist:691ec0ba93d3dc28c3b19abde2f24ae2
Created October 8, 2018 09:09
deepspeech 0.2.0 english fine-tuning to fr
(tf-venv-master) alexandre@serveur:~/Documents/codaz/Mozilla/DeepSpeech/DeepSpeech-lissyx$ python -u DeepSpeech.py --decoder_library_path /home/alexandre/tmp/deepspeech-0.2.1/libctc_decoder_with_kenlm.so --alphabet_config_path data/alphabet.txt --train_files /home/alexandre/tmp/deepspeech-fr/d
ata/training_speech_2018-09-28_fr_FR_train.csv --dev_files /home/alexandre/tmp/deepspeech-fr/data/training_speech_2018-09-28_fr_FR_dev.csv --test_files /home/alexandre/tmp/deepspeech-fr/data/training_speech_2018-09-28_fr_FR_test.csv --train_batch_size 64 --dev_batch_size 64 --test_bat
ch_size 64 --n_hidden 2048 --epoch 30 --learning_rate 0.0001 --display_step 0 --validation_step 1 --dropout_rate 0.2 --checkpoint_step 1 --checkpoint_dir ~/tmp/deepspeech-fr/checkpoints/ --export_dir ~/tmp/deepspeech-fr/model/ --initialize_from_frozen_model ~/tmp/deepspeech-0.2/models/output_
graph.pb
Preprocessing ['/home/alexandre/tmp/deepspeech-fr/data/training_speech_2018-09-28_fr_FR_train.csv']
Preprocessing done
Preproce
import os
import dbus
import time
session_bus = dbus.SessionBus()
session_bus.call_blocking(
'org.gnome.Shell.Screencast',
'/org/gnome/Shell/Screencast',
'org.gnome.Shell.Screencast',
'Screencast',
import os
import dbus
import time
session_bus = dbus.SessionBus()
session_bus.call_blocking(
'org.gnome.Shell.Screencast',
'/org/gnome/Shell/Screencast',
'org.gnome.Shell.Screencast',
'Screencast',