Tag Archives: GPU

[Linux] PaddlePaddle with GPU on DGX Spark

Abstract

One of the most powerful OCR engines available as open source is PaddlePaddle. Sadly, Paddle is only available on ARM64 (aarch64) with CPU support. No binaries are provided for ARM64 with GPU support. Thus, running PaddlePaddle on an NVIDIA DGX Spark won’t make use of its powerful Blackwell GPU.

The only way currently available is to compile PaddlePaddle for CUDA 13.0 on an NVIDIA DGX Spark manually. As manual compiling often comes with hurdles, I will try to briefly address the compiling process in the following article.

As of Q1/2026 the DGX Spark is preinstalled with an NVIDIA branded version of Ubuntu 24.04 for ARM64 dubbed DGX OS 7.

Recommendations

I. AI Support for help compiling process
While all LLMs have pro’s and con’s, I had best results in this specific case with Anthropic’s Claude. It guided me through some issues in Step 8 and Step 9. Support provided by ChatGPT or Gemini didn’t bring me on the right track.

II. Machine needs to have latest updates
Furthermore, have all updates installed and have had a fresh reboot. Have no kernel or firmware update pending. Just don’t.

Step 1. Check this

$ uname -m          # is aarch64, right?
$ nvcc --version    # CUDA 13.0 (or 12.9+)
$ nvidia-smi        # GB10, Compute Capability 12.1
$ python3 --version # 3.10–3.12 recommended

Step 2. Dependencies

$ sudo apt-get update
$ sudo apt-get install -y \
git cmake ninja-build \
python3-dev python3-pip python3-venv \
libopenblas-dev liblapack-dev \
gfortran patchelf swig \
wget curl unzip \
libssl-dev zlib1g-dev
$ pip3 install cython wheel setuptools numpy protobuf

Step3: Check for CUDA 13.0 Toolkit for SBSA/aarch64

$ dpkg -l | grep cuda-toolkit

If not installed, install via apt on DGX OS:
$ sudo apt-get install cuda-toolkit-13-0

Step 4. Python Venv for Paddle Compiling

Create a python virtual environment for the compilation process.

$ python3 -m venv paddle_env

Activate and start the virtual environment

$ source ~/paddle_env/bin/activate

Step 5: Install Build-Dependencies into Venv for Paddle Compiling

(paddle_env)$ pip install --upgrade pip
(paddle_env)$ pip install numpy protobuf cython wheel setuptools

Verify with:

(paddle_env)$ which python3 # must show ~/paddle_env/bin/python3                            # NOT /usr/bin/python3
(paddle_env)$ python3 --version    # 3.12.3(paddle_env)$ pip --version        # pip xx.x from ~/paddle_env/...

Step 6. Clone PaddlePaddle Source

(paddle_env)$ cd ~
(paddle_env)$ git clone https://github.com/PaddlePaddle/Paddle.git
(paddle_env)$ cd Paddle

Current Stable-Branch (3.x)
(paddle_env)$ git checkout develop # or git checkout v3.3.0

Submodules
(paddle_env)$ git submodule update --init --recursive

Verify

(paddle_env)$ ls ~/Paddle
(paddle_env)$ git log --oneline -3

Step 7. Install Packaging

(paddle_env)$ pip install -r ~/Paddle/python/requirements.txt

Step 8. This is nasty part A
It took many attempts, because “Eigen” gave errors during compilation. This flag eventually worked: DCMAKE_CUDA_FLAGS=”-U__ARM_NEON -DEIGEN_DONT_VECTORIZE=1″.

(paddle_env)$ cd ~/Paddle/build

As known, this cmake also creates a log file (“cmake_output.log”) that helps a lot when determining reasons for errors. Nowadays AI-LLMs are very helpful for analysing in case anything goes south.

(paddle_env)$ cmake .. \    -GNinja \
    -DCMAKE_BUILD_TYPE=Release \
    -DWITH_GPU=ON \
    -DWITH_TESTING=OFF \
    -DCUDA_ARCH_NAME=Manual \
    -DCUDA_ARCH_BIN="12.1" \
    -DWITH_ARM=ON \
    -DWITH_AVX=OFF \
    -DWITH_MKL=OFF \
    -DWITH_MKLDNN=OFF \
    -DWITH_TENSORRT=OFF \
    -DCMAKE_CUDA_FLAGS="-U__ARM_NEON -DEIGEN_DONT_VECTORIZE=1" \
    -DPYTHON_EXECUTABLE=$(which python3) \
    2>&1 | tee cmake_output.log

Step 9. This is nasty part II
in case everything went well, you can you start compiling:
(paddle_env)$ ninja -j$(nproc) 2>&1 | tee build_output.log

This compiling process took about 40mins on my DGX

Step 10. Install DGX compatible PaddlePaddle wheel to your working Venv

Leave the compilation Venv (deactivate) and activate your desired working Venv (!!!!) Don’t use the compilation Venv for working purposes and neither use your working Venv as a compilation Venv.

Deactivate your compiling Venv and start your working Venv
(paddle_env)$ deactivate
$ source /your_working_venv/bin/activate

Install PaddleOCR core library, dependencies and the CLI tool (paddleocr). PaddleOCR by default installs only the CPU version on a DGX-Spark as a GPU version (paddlepaddle-gpu) is not (yet) provided for ARM64.

(your_working_venv)$ pip install paddleocr #installs core library, dependencies and CLI tool.

Now install your freshly compiled PaddlePaddle wheel to your desired Venv.
(your_working_venv)$
pip install ~/Paddle/build/python/dist/paddlepaddle_gpu-3.4.0.dev20260405-cp312-cp312-linux_aarch64.whl

Lemme know, if it helps…

[Pre] webOS 1.3.5, webOS 1.3.5.1 and the CES 2010

European customers are still waiting for webOS 1.3.5 update. The European carrier Telefonica (o2 and MoviStar)  seems not to have approved it yet.

Meanwhile it seems versions 1.3.5 had issues. According to PreCentral.net, Palm Pre customers on Sprint (USA) and Bell (Canada) are able to update to version 1.3.5.1 since Januar 5th, 2010. Version 1.3.5 has been released in the US and Canada on December 29th, 2009.

Issues with homebrew apps on 1.3.5 and 1.3.5.1

It is known, that webOS 1.3.5 breaks homebrew installer PreWare. Known workaround is using WebOS Quick Install to remove and then reinstall PreWare. It should be working well again.

There are also issues with homebrew apps that don’t contain  an appinfo.json file. Apps not properly prepared would not be getting moved from /var to /media/cryptofs/apps. Package Manager Service 0.9.24.3 has fixes for this problem.

And the latest 1.3.5.1 also breaks myTether. This seems not resolved yet.

Amazing news

In the meantime people from the WebOS Internal forums have discovered, that webOS 1.3.5 includes Simple DirectMedia Layer (SDL). SDL allows hardware accelerated graphics and sound and is available on different platforms for free and open source. Via homebrew installer PreWare a playable alpha version of Doom using SDL has already been released.

Europeans still waiting

Although Palm is said to be unveiling something big on the CES 2010 tomorrow, we don’t expect Telefonica to approve 1.3.5 until then for Europe.

It is rumored, on the CES Verizon Wireless will be officially named the new partner for a device called Palm Pre Plus (Palm Pre 3).

Links

» PreCentral: webOS 1.3.5.1 Available for OTA Download
» PreCentral: webOS 1.3.5.1 goes live for Pre users on Bell
» PreCentral Forums: Status of Preware and 1.3.5
» PreCentral Forums: Preware + mytether unavailable after 1.3.5.1
» WebOS Internals Wiki: Doom on Palm Pre
» Wikipedia: Simple DirectMedia Layer (SDL)…
» WebOS Blog: Was kommt zur CES 2010 von Palm? (Google translated link)…
» PhoneArea: Verizon to get Palm Pre Plus

Video

[Pre] Update 1.3.1 for GSM to be Released Nov 23, 2009 ?

According to a posting to the german Nexave forums the european Palm Pre 1.3.1 update (for GSM phones) will be released on monday November 23, 2009. The update does not seem to include activation of the GPU.

We recommend to remove custom installed homebrew patches.

Features:

  • Synergy: – Calendar and Contacts synchronization with Yahoo!
  • LinkedIn contacts synchronization
  • Synchronizes Google Contacts “My Contacts” (not all)
  • Manual edit of Internet settings (APN, user name, password, etc.)
  • Option to disable all data connections
  • Bluetooth support to send / receive vCards
  • Backup and restore:
  • No backup of passwords for increased security
  • Disabling of backup service works
  • Backup Browser Favorites
  • iTunes support from version 9.x
  • Available space is immediately updated and displayed when in USB mass storage mode data is added or removed
  • Manual e-mail retrieval works
  • SMS / MMS forwarding, and marking of all communications
  • Highlight / copy of selected areas of SMS and IM messages
  • Browser: File download in browser
  • Highlight / copy of text in the browser
  • Support for Self-Signed Certificates
  • System volume was optimized
  • Optimization of the audible during an incoming call when another call is active
  • AppCatalog: Recommendation for Apps can be forwared via email or SMS
  • Facebook Application
  • Country-Specific Application Offers
  • Initial Registration: password input is now a part of the recovery (because passwords will no longer be backed up) and now entering a security question and answer in the account creation is mandatory. SIM card PIN is requested during the registration process.

via Nexave.de Forums…