Jetpack 3.2 includes Cuda 9 and CuDNN 7 so it is necessary to compile it from source.
sudo apt-get install openjdk-8-jdk
# -------------------------------------------------------- | |
# Camera sample code for Tegra X2/X1 | |
# | |
# This program could capture and display video from | |
# IP CAM, USB webcam, or the Tegra onboard camera. | |
# Refer to the following blog post for how to set up | |
# and run the code: | |
# https://jkjung-avt.github.io/tx2-camera-with-python/ | |
# | |
# Written by JK Jung <[email protected]> |
// cat cling_opencv_example.cpp | cling | |
.L /usr/lib/libopencv_highgui.so | |
#include <opencv/highgui.h> | |
#include <math.h> | |
#include <iostream> | |
using namespace std; | |
template <typename T> T deg2rad(T deg) { return deg*M_PI/180.0; } |
# run with a custom --n | |
# python run_luigi.py SquaredNumbers --local-scheduler --n 20 | |
import luigi | |
class PrintNumbers(luigi.Task): | |
n = luigi.IntParameter(default=10) | |
def requires(self): | |
return [] |
This configuration worked for me, hope it helps
It is based on: https://becominghuman.ai/deep-learning-gaming-build-with-nvidia-titan-xp-and-macbook-pro-with-thunderbolt2-5ceee7167f8b
and on: https://stackoverflow.com/questions/44744737/tensorflow-mac-os-gpu-support
#!/bin/bash | |
# | |
# pyTorch install script for NVIDIA Jetson TX1/TX2, | |
# from a fresh flashing of JetPack 2.3.1 / JetPack 3.0 / JetPack 3.1 | |
# | |
# for the full source, see jetson-reinforcement repo: | |
# https://github.com/dusty-nv/jetson-reinforcement/blob/master/CMakePreBuild.sh | |
# | |
# note: pyTorch documentation calls for use of Anaconda, | |
# however Anaconda isn't available for aarch64. |
#!/bin/bash | |
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
import tensorflow as tf | |
import numpy as np | |
import time | |
from tensorflow.contrib.rnn import BasicLSTMCell | |
# https://github.com/tensorflow/tensorflow/issues/24828 | |
try: | |
from tensorflow.compat.v1 import ConfigProto | |
from tensorflow.compat.v1 import InteractiveSession |
/* | |
Check SSE/AVX support. | |
This application can detect the instruction support of | |
SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, SSE4a, SSE5, and AVX. | |
grep avx /proc/cpuinfo | |
g++ ssecheck.cpp -o ssecheck | |
*/ | |
#include <iostream> | |
#ifdef _MSC_VER |