Repository navigation
TensorFlow 2.21.0 — Power9 GPU build (PPC64LE + CUDA 12.4)
TensorFlow 2.21.0 ported to the PPC64LE architecture with GPU/CUDA
support on IBM Power9 + NVIDIA Tesla V100 systems.
Package
| File | Description |
|---|---|
tensorflow-2.21.0-cp311-cp311-linux_ppc64le.whl |
Wheel ready for pip install (CPython 3.11, Linux PPC64LE) |
python3 -m pip install tensorflow-2.21.0-cp311-cp311-linux_ppc64le.whlSupported platform
- Architecture: ppc64le (Power9)
- OS: Linux (kernel ≥ 4.18)
- Python: CPython 3.11
- CUDA: 12.4 (host toolkit)
- cuDNN: 9.0.0 (official NVIDIA ppc64le redist)
- NCCL: 2.x (
libnccl.so.2onLD_LIBRARY_PATH) - GPU tested: NVIDIA Tesla V100 (Volta,
sm_70)
Source
Branch: power9-v2.21.0-gpu — derived from the upstream
v2.21.0 tag.
Diff vs upstream: 401 files, +88,757 / -3,205 lines.
Main modifications vs upstream v2.21.0
Toolchain (PPC64LE)
- LLD linker: patch to emit
PPC64R2SaveStubfor long-branch thunks
(stabilises r2/TOC across stub calls intocudart_stub/Implib.so). libppc64_savres.a:_savefpr_NN/_restfpr_NNroutines manually
injected (LLD does not auto-generate them on PPC64LE).- Extra linkopts:
-Wl,--no-multi-toc -Wl,--no-plt-localentry
(works around the BFD multi-TOC + local entry bug on large targets). gcc_cuda_wrapper: forces Clang as the assembler for.Sfiles of
Implib.so (GAS 2.30 rejects.localentry sym,1, Clang accepts).
CUDA / cuDNN
- Dynamic
cudart:cudart_staticremoved; uses the host's
libcudart.so.12. - Separate
cuda_redist_stub+cuda_nccl_stub: hard-coded
TF_NCCL_VERSION="2"(avoids TF attemptingdlopen("libnccl.so.12"),
which does not exist). - cuDNN 9: loaded at runtime via
LD_LIBRARY_PATH(cuda_unified+
Conda'slib/directory).
Compiler / headers
- absl headers: patches for compatibility with NVCC's
cudafe++parser
(insert_or_assign/try_emplaceSFINAE templates). inline namespacein.cu.cc: fixesTOC16/PLTrelocs emitted by
NVCC (the simplernamespace + using namespaceform does not work).- GCC 11 / XLA: fixes for
std::vector::reservewithnoexceptmove
ctor and brace-init inexpand_integer_power.cc. - BoringSSL / pybind11 / protobuf: platform-specific visibility and
build patches.
Disabled features
- MLIR-generated GPU kernels
(--//tensorflow/core/kernels/mlir_generated:enable_gpu=False):
hlo_to_kernelsegfaults in NVPTX codegen on PPC64LE.
How to reproduce the build
git clone https://github.com/llm-pt-ibm/TensorFlow-2.21-Power9.git
cd TensorFlow-2.21-Power9/gpu
bash build_tf221_power9_gpu_generic.shPrerequisites: Miniforge3, CUDA 12.4 toolkit, local cuDNN 9.0.0 ppc64le
tarball, ~80 GB free disk, 32 GB+ RAM (parallel build).
Quick verification
import tensorflow as tf
print(tf.__version__) # 2.21.0
print(tf.config.list_physical_devices('GPU')) # [PhysicalDevice(name='/physical_device:GPU:0', ...)]
print(tf.test.is_built_with_cuda()) # TrueKnown limitations
- Builds tested only on V100 (
sm_70). Ampere/Hopper architectures have
not been validated. cudart_staticis incompatible: the.whlrequireslibcudart.so.12
reachable viaLD_LIBRARY_PATHat runtime.- MLIR-generated GPU kernels disabled (see above).
Support: llm-pt-ibm/TensorFlow-2.21-Power9.