{"id":7780,"library":"tensorflow-intel","title":"TensorFlow-Intel","description":"TensorFlow-Intel is an optimized distribution of the open-source machine learning framework TensorFlow, specifically tailored for Intel CPUs. It leverages Intel's oneAPI Deep Neural Network Library (oneDNN) primitives to enhance performance for deep learning workloads. This package is compatible with existing TensorFlow code and is maintained by Intel in collaboration with Google, aiming to provide maximal performance on Intel architectures. It is actively developed with regular updates to support newer TensorFlow versions and Intel hardware.","status":"active","version":"2.18.0","language":"en","source_language":"en","source_url":"https://github.com/Intel-tensorflow/tensorflow","tags":["machine learning","deep learning","tensorflow","intel","cpu-optimization","ai","onednn"],"install":[{"cmd":"pip install tensorflow-intel","lang":"bash","label":"Install latest stable version"}],"dependencies":[{"reason":"Required Python version.","package":"python","optional":false}],"imports":[{"note":"The primary import is the standard TensorFlow module; optimizations are applied under the hood.","symbol":"tensorflow","correct":"import tensorflow as tf"},{"note":"Keras is integrated into TensorFlow and imported directly from the tensorflow package.","symbol":"tensorflow.keras","correct":"from tensorflow import keras"}],"quickstart":{"code":"import tensorflow as tf\n\n# Verify TensorFlow installation and CPU setup\nprint(tf.reduce_sum(tf.random.normal([1000, 1000])))\n\n# Basic Keras example\nmodel = tf.keras.Sequential([\n    tf.keras.layers.Dense(10, activation='relu', input_shape=(784,)),\n    tf.keras.layers.Dense(10, activation='softmax')\n])\nmodel.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])\nmodel.summary()","lang":"python","description":"This quickstart code verifies the TensorFlow-Intel installation by performing a simple tensor operation and demonstrates a basic Keras model setup. A successful installation should print a tensor sum and the model summary."},"warnings":[{"fix":"Use `pip install tensorflow-intel` or `pip install intel-extension-for-tensorflow[cpu]` alongside `tensorflow`.","message":"The separate `Intel® Optimization for TensorFlow*` package (`intel-tensorflow`) has been discontinued as of Q1 2024. Users should transition to `tensorflow-intel` or stock TensorFlow with `Intel® Extension for TensorFlow*` for Intel CPU optimizations.","severity":"deprecated","affected_versions":"<=2.13.0 of `intel-tensorflow`"},{"fix":"Be aware of this automatic substitution; if a pure upstream TensorFlow build is desired, specific build-from-source methods or alternative distributions might be needed.","message":"Installing `tensorflow` or `tensorflow-cpu` on Windows might automatically install `tensorflow-intel` to provide Intel optimizations. While generally beneficial, this can be unexpected for some users.","severity":"gotcha","affected_versions":"All versions where `tensorflow-intel` is the default CPU backend for Windows."},{"fix":"For versions <2.9, ensure `export TF_ENABLE_ONEDNN_OPTS=1` is set before running your script. For >=2.9, no action is needed as it's enabled by default.","message":"Enabling oneAPI Deep Neural Network Library (oneDNN) optimizations required setting the environment variable `TF_ENABLE_ONEDNN_OPTS=1` for TensorFlow versions 2.5 through 2.8. Starting with TensorFlow v2.9 (and thus in `tensorflow-intel`), these optimizations are enabled by default.","severity":"gotcha","affected_versions":"TensorFlow-Intel <2.9 (if it mirrored TensorFlow's behavior)"},{"fix":"Choose one package for Intel optimizations. `tensorflow-intel` is for Intel CPU optimizations, while `intel-extension-for-tensorflow` is a plugin for stock TensorFlow to enable both CPU and GPU acceleration. Do not install both simultaneously.","message":"Attempting to install both `tensorflow-intel` and `intel-extension-for-tensorflow` in the same Python environment, or mixing `tensorflow-intel` with the old `intel-tensorflow` (Intel® Optimization for TensorFlow*), can lead to conflicts and undefined behavior.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"If you intend to use only the CPU or an Intel GPU (and have `Intel® Extension for TensorFlow*` installed and configured correctly), this message can usually be ignored. If you have an NVIDIA GPU, ensure CUDA and cuDNN are correctly installed and configured for TensorFlow.","cause":"This message is often benign when running `tensorflow-intel` on a CPU-only system or an Intel GPU system without NVIDIA CUDA. TensorFlow attempts to detect CUDA devices by default.","error":"Could not find CUDA drivers on your machine, GPU will not be used."},{"fix":"Ensure you have activated the correct virtual environment and run `pip install tensorflow-intel`. If `absl-py` is specifically mentioned, `pip install absl-py` might be needed, though it's typically a transitive dependency.","cause":"The package or one of its core dependencies is not installed, or the Python environment is not correctly activated.","error":"ModuleNotFoundError: No module named 'tensorflow' (or 'keras', 'absl-py')"},{"fix":"Check the available versions on PyPI for your specific Python version and OS (e.g., `pip install 'tensorflow-intel<2.11'` for older Windows GPU versions, or simply `pip install tensorflow-intel` for the latest compatible version). Consider upgrading your Python interpreter if needed, as `tensorflow-intel` requires Python >=3.9.","cause":"The specified version of `tensorflow-intel` is not available for your Python version, operating system, or architecture.","error":"Could not find a version that satisfies the requirement tensorflow-intel==X.Y.Z"}]}