@@ -74,36 +74,42 @@ package sources:
74
74
Alternatively, you can download and unpack the pre-built
75
75
[ Clang + LLVM 16] ( https://github.com/llvm/llvm-project/releases/tag/llvmorg-16.0.0 ) .
76
76
77
- Below is an example of steps you can take to set up the downloaded
78
- Clang + LLVM 16 binaries :
77
+ Below is an example of steps you can take to set up the downloaded Clang + LLVM
78
+ 16 binaries on Debian/Ubuntu operating systems :
79
79
80
- 1 . Change to the desired destination directory:
81
- ``` cd <desired directory> ```
80
+ 1 . Change to the desired destination directory: ` cd <desired directory> `
82
81
83
- 2 . Load and extract an archive file...(suitable to your architecture):
82
+ 1 . Load and extract an archive file...(suitable to your architecture):
84
83
<pre class =" prettyprint lang-bsh " >
85
- <code class =" devsite-terminal " >
86
- wget https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.0/clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
84
+ <code class =" devsite-terminal " >wget https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.0/clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
87
85
</code >
88
86
<code class =" devsite-terminal " >tar -xvf clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
89
87
</code >
90
88
</pre >
91
89
92
- 3 . Check the obtained Clang + LLVM 16 binaries version:
90
+ 1 . Copy the extracted contents (directories and files) to ` /usr ` (you may need
91
+ sudo permissions, and the correct directory may vary by distribution). This
92
+ effectively installs Clang and LLVM, and adds it to the path. You should not
93
+ have to replace anything, unless you have a previous installation, in which
94
+ case you should replace the files:
93
95
<pre class =" prettyprint lang-bsh " >
94
- <code class =" devsite-terminal " >
95
- ./clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang-16 --version </code >
96
+ <code class =" devsite-terminal " >cp -r clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/* /usr</code >
96
97
</pre >
97
98
98
- 4 . Directory ` /clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang-16 ` is
99
- the actual path to your new clang. You can run the ` ./configure ` script or
100
- manually set environment variables ` CC ` and ` BAZEL_COMPILER ` to this path.
99
+ 1 . Check the obtained Clang + LLVM 16 binaries version:
100
+ <pre class =" prettyprint lang-bsh " >
101
+ <code class =" devsite-terminal " >clang --version</code >
102
+ </pre >
103
+
104
+ 1 . Now that ` /usr/bin/clang ` is the actual path to your new clang. You can run
105
+ the ` ./configure ` script or manually set environment variables ` CC ` and
106
+ ` BAZEL_COMPILER ` to this path.
101
107
102
108
### Install GPU support (optional, Linux only)
103
109
104
110
There is * no* GPU support for macOS.
105
111
106
- Read the [ GPU support] ( ./gpu .md ) guide to install the drivers and additional
112
+ Read the [ GPU support] ( ./pip .md ) guide to install the drivers and additional
107
113
software required to run TensorFlow on a GPU.
108
114
109
115
Note: It is easier to set up one of TensorFlow's GPU-enabled [ Docker images] ( #docker_linux_builds ) .
@@ -204,7 +210,7 @@ Preconfigured Bazel build configs to DISABLE default on features:
204
210
205
211
#### GPU support
206
212
207
- For [ GPU support] ( ./gpu .md ) , set ` cuda=Y ` during configuration and specify the
213
+ For [ GPU support] ( ./pip .md ) , set ` cuda=Y ` during configuration and specify the
208
214
versions of CUDA and cuDNN. If your system has multiple versions of CUDA or
209
215
cuDNN installed, explicitly set the version instead of relying on the default.
210
216
` ./configure ` creates symbolic links to your system's CUDA libraries—so if you
@@ -336,8 +342,8 @@ docker run -it -w /tensorflow -v <var>/path/to/tensorflow</var>:/tensorflow -v $
336
342
With the source tree set up, build the TensorFlow package within the container's
337
343
virtual environment:
338
344
339
- 1 . Optional: Configure the build—this prompts the user to answer build configuration
340
- questions.
345
+ 1 . Optional: Configure the build—this prompts the user to answer build
346
+ configuration questions.
341
347
2 . Build the tool used to create the * pip* package.
342
348
3 . Run the tool to create the * pip* package.
343
349
4 . Adjust the ownership permissions of the file for outside the container.
@@ -374,7 +380,7 @@ Docker is the easiest way to build GPU support for TensorFlow since the *host*
374
380
machine only requires the
375
381
[ NVIDIA®  ; driver] ( https://github.com/NVIDIA/nvidia-docker/wiki/Frequently-Asked-Questions#how-do-i-install-the-nvidia-driver ) {:.external}
376
382
(the * NVIDIA® CUDA® Toolkit* doesn't have to be installed). Refer to the
377
- [ GPU support guide] ( ./gpu .md ) and the TensorFlow [ Docker guide] ( ./docker.md ) to
383
+ [ GPU support guide] ( ./pip .md ) and the TensorFlow [ Docker guide] ( ./docker.md ) to
378
384
set up [ nvidia-docker] ( https://github.com/NVIDIA/nvidia-docker ) {:.external}
379
385
(Linux only).
380
386
0 commit comments