Registry / ai-ml / tensorflow-aarch64

tensorflow-aarch64

JSON →
library2.16.1pypypiunverified

TensorFlow for AArch64 is an open-source machine learning framework providing a flexible architecture for high-performance numerical computation on ARM 64-bit systems. Since TensorFlow 2.10, official Linux CPU builds for AArch64/ARM64 processors are built, maintained, tested, and released by a third-party collaboration including AWS, ARM, and Linaro. The current version is 2.16.1. It follows the main TensorFlow release cadence.

pip install tensorflow-aarch64
INSTALL
IMPORT
SIG · TENSORFLOW-AARCH64
T
tensorflow-aarch64
ai-mlpythonv2.16.1
Install
3.2s avg
Import
Disk
173MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
4/8 runs
✓ 2.99s
py 3.11
4/8 runs
✓ 2.83s
py 3.12
4/8 runs
✓ 3.86s
py 3.13
4/8 runs
4/8 runs
py 3.9
4/8 runs
✓ 3.21s
173MB installed
● package 173MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

tensorflow
import tensorflow_aarch64 as tf
import tensorflow_aarch64 as tf

This quickstart demonstrates a simple image classification task using the MNIST dataset and TensorFlow's Keras API. It also includes checks for TensorFlow version and available GPU devices.

import tensorflow as tf print("TensorFlow version:", tf.__version__) # Check for GPU devices (will be empty if only CPU is available) gpus = tf.config.list_physical_devices('GPU') if gpus: print(f"Detected GPUs: {gpus}") else: print("No GPU devices found.") mnist = tf.keras.datasets.mnist (x_train, y_train), (x_test, y_test) = mnist.load_data() x_train, x_test = x_train / 255.0, x_test / 255.0 model = tf.keras.models.Sequential([ tf.keras.layers.Flatten(input_shape=(28, 28)), tf.keras.layers.Dense(128, activation='relu'), tf.keras.layers.Dropout(0.2), tf.keras.layers.Dense(10) ]) loss_fn = tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True) model.compile(optimizer='adam', loss=loss_fn, metrics=['accuracy']) print("\nTraining model...") model.fit(x_train, y_train, epochs=1) print("\nEvaluating model...") model.evaluate(x_test, y_test, verbose=2)
Debug
Known issues
breakingStarting with TensorFlow 2.10, Linux CPU-builds for Aarch64/ARM64 processors are built, maintained, and released by a third party (AWS). This change might affect users who relied on previous community-built `tensorflow-aarch64` packages.
fix
Ensure you are using the officially provided `tensorflow-aarch64` package from PyPI. If you previously used a custom build, consider migrating to the official package for better support and compatibility. Verify source via `pip show tensorflow-aarch64`.
affects: >=2.10
breakingTensorFlow has specific Python version requirements. TensorFlow 2.16.1 requires Python >=3.9. Future versions (e.g., TF 2.21) will remove support for Python 3.9.
fix
Always check the official TensorFlow installation guide for the exact Python version compatibility for your desired TensorFlow version. Use a Python virtual environment to manage dependencies and avoid conflicts.
affects: All versions
gotchaThe default Keras version in TensorFlow 2.16 and later is Keras 3.0. If your existing code relies on Keras 2.0 specific behaviors or APIs, it might break.
fix
To explicitly use Keras 2.0, install `tf-keras` via `pip install tf-keras~=2.16` and change your imports from `import tensorflow.keras as keras` to `import tf_keras as keras`.
affects: >=2.16
gotchaWhen checking the type of a TensorFlow tensor, relying on exact type checking (e.g., `type(t) == tf.Tensor`) might fail due to changes in class hierarchy (explicit `EagerTensor` and `SymbolicTensor` classes).
fix
Use `isinstance(t, tf.Tensor)` for robust type checking, as recommended by TensorFlow documentation.
affects: >=2.18
gotchaSome AArch64 systems may encounter `cannot allocate memory in static TLS block` errors related to `libgomp` when running TensorFlow.
fix
As a workaround, try setting the `LD_PRELOAD` environment variable: `export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1` before running your TensorFlow application. The exact path to `libgomp.so.1` may vary slightly depending on your distribution.
affects: All versions (system-dependent)
Upgrade
Version history
2.16.1latest on PyPI · released Mar 14, 2024
Audit
Dependencies
numpyrequiredFundamental for numerical operations.
kerasrequiredHigh-level API for building and training models. Note that starting with TF 2.16, Keras 3 is the default.
absl-pyrequiredAbseil Python Common Libraries.
protobufrequiredUsed for serializing structured data.
tensorboardrequiredVisualization toolkit for TensorFlow.
tensorflow-io-gcs-filesystemoptionalEnables GCS filesystem support. Optional since TF 2.21, install explicitly if needed.
nvidia-cuda-runtime-cu12optionalFor NVIDIA GPU support (requires compatible CUDA Toolkit installation).
nvidia-cudnn-cu12optionalFor NVIDIA GPU support (requires compatible cuDNN installation).
Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
tensorflow-aarch64 — pip install tensorflow-aarch64 · libregistry