Skip to content

Instantly share code, notes, and snippets.

@discort
Last active May 18, 2021 14:29
Show Gist options
  • Save discort/2213fcd6a2d408e930d3b53334332f9d to your computer and use it in GitHub Desktop.
Save discort/2213fcd6a2d408e930d3b53334332f9d to your computer and use it in GitHub Desktop.
My experience using Jetson AVG Xavier for Deep Learning

Setting Jetson Xavier for Deep Learning

#jetson #nvidia

Jetson AVG Xavier specs

The full tech specs described here We are interested in the next ones:

GPU: 512-core Volta GPU with Tensor Cores
CPU: 8-core ARM v8.2 64-bit CPU, 8MB L2 + 4MB L3
Memory: 32GB 256-Bit LPDDR4x | 137GB/s

The performance of Jetson Xavier is comparable to gtx 1080. Jetson works a bit slower on equal batches however on large batches outperforms GTX 1080*.

2560 CUDA cores, Memory Speed 10 Gbps, Standard Memory 8 GB GDDR5X, 320 Memory Bandwidth (GB/sec)
  • Measured using a simple conv net on MNIST.

Install JetPack

Check out this video

  • Check existing JetPack version
sudo apt-cache show nvidia-jetpack

Install python3.8 on JetPack 4.4

apt-get install python3.8
apt-get install python3.8-dev
apt-get install python3.8-venv

Check here if there are any issues

Check ssh access

ssh nvidia@<eth0 address> pass - nvidia source

Monitoring

There is no official tool like nvidia-smi however you can install jtop as an alternative.

Installing Pytorch

https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-8-0-now-available/72048

Installing Torchaudio

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
		  cmake \
		  sox \
		  libsox-dev \
		  libsox-fmt-all \
    && rm -rf /var/lib/apt/lists/*

RUN pip3 install scikit-build && \
    pip3 install ninja
    
RUN git clone --recursive -b ${TORCHAUDIO_VERSION} https://github.com/pytorch/audio torchaudio && \
    cd torchaudio && \
    python3 setup.py install && \
    cd ../ && \
    rm -rf torchaudio

from https://github.com/dusty-nv/jetson-containers/blob/1e10908a104494a883f6855d1e9947827f2a17bc/Dockerfile.pytorch#L90

Note. libsox is not supported by torchaudio team. source

Custom Fan Management

Fan Management Xavier This command will manually turn off the fan:

echo 0 | sudo tee /sys/devices/pwm-fan/target_pwm

And this command will run the fan at maximum speed:

echo 255 | sudo tee /sys/devices/pwm-fan/target_pwm

Upgrading

  • NVMe Solid State Disk can be installed.

Drawbacks:

  • There is no way to run intel's MKL on Jetson, so some software may not work. Pytorch's team promise to add BLAS support however it's under development

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment