|
1 |
| -# Compile TensorFlow C++ from source code |
| 1 | +# Compile TensorFlow C++ from source code <!-- omit in toc --> |
2 | 2 |
|
3 | 3 | Building TensorFlow C++ API is very tricky and can be a pain as there is not much information you can find about it even on TensorFlow's official documentation. Following you will find a step-by-step instruction showing how to build TensorFlow C++ v2 on Linux. It works well for my Ubuntu 20.04 running on AMD Ryzen processors.
|
4 | 4 |
|
5 | 5 | On this page, I will walk you through the steps to install **TensorFlow C++ API version 2.7**.
|
6 | 6 |
|
7 |
| -- [Compile TensorFlow C++ from source code](#compile-tensorflow-c-from-source-code) |
8 |
| - - [Dependencies](#dependencies) |
9 |
| - - [Install package dependencies](#install-package-dependencies) |
10 |
| - - [1. Environment setup](#1-environment-setup) |
11 |
| - - [2. Install Bazel](#2-install-bazel) |
12 |
| - - [3. Install Protobuf](#3-install-protobuf) |
13 |
| - - [Compile TensorFlow C++ and install libraries](#compile-tensorflow-c-and-install-libraries) |
14 |
| - - [1. Compile TensorFlow C++ shared library (with optimization)](#1-compile-tensorflow-c-shared-library-with-optimization) |
15 |
| - - [2. Copy required files into a single path for C++ linkage](#2-copy-required-files-into-a-single-path-for-c-linkage) |
16 |
| - - [3. Compiling the op library and example code](#3-compiling-the-op-library-and-example-code) |
17 |
| - - [Optional: Compile TensorFlow via pip (wheel) builder](#optional-compile-tensorflow-via-pip-wheel-builder) |
18 |
| - - [References](#references) |
| 7 | +- [Dependencies](#dependencies) |
| 8 | +- [Install package dependencies](#install-package-dependencies) |
| 9 | + - [1. Environment setup](#1-environment-setup) |
| 10 | + - [2. Install Bazel](#2-install-bazel) |
| 11 | + - [3. Install Protobuf](#3-install-protobuf) |
| 12 | +- [Compile TensorFlow C++ and install libraries](#compile-tensorflow-c-and-install-libraries) |
| 13 | + - [1. Compile TensorFlow C++ shared library (with optimization)](#1-compile-tensorflow-c-shared-library-with-optimization) |
| 14 | + - [2. Copy required files into a single path for C++ linkage](#2-copy-required-files-into-a-single-path-for-c-linkage) |
| 15 | + - [3. Compiling the op library and example code](#3-compiling-the-op-library-and-example-code) |
| 16 | +- [Optional: Compile TensorFlow via pip (wheel) builder](#optional-compile-tensorflow-via-pip-wheel-builder) |
| 17 | +- [References](#references) |
19 | 18 |
|
20 | 19 | ## Dependencies
|
21 | 20 |
|
|
0 commit comments