Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Documents and How-To
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ting-Shuo Yo
Documents and How-To
Commits
2bab0afc
Commit
2bab0afc
authored
Dec 17, 2018
by
Ting-Shuo Yo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
d3c5fc29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
centos7.6_tensorflow-gpu/README.md
centos7.6_tensorflow-gpu/README.md
+21
-4
No files found.
centos7.6_tensorflow-gpu/README.md
View file @
2bab0afc
...
...
@@ -124,19 +124,33 @@ export LIBRARY_PATH=/usr/local/cuda/lib64/:$LIBRARY_PATH
# 3. Install TensorFlow-GPU
## 3.1 Install and Update Python
1.
Download the latest Anaconda from the
[
Anaconda website
](
https://www.anaconda.com/download/
)
.
`$ wget https://repo.anaconda.com/archive/Anaconda3-5.3.1-Linux-x86_64.sh`
2.
Install Anaconda with the downloaded binary.
`$ bash Anaconda3-5.3.1-Linux-x86_64.sh `
3.
Downgrade python to 3.6 for compatability:
```
$ conda install python=3.6
$ conda update --all
```
## 3.2 Install tensorflow-gpu
With all packages and libraries installed, this might be the easiest step:
`$ pip install tensorflow-gpu`
## 3.3 Testing
https://www.tensorflow.org/guide/using_gpu
Finally, let's test whether the whole configuration works. According to the
[
documentation of tensorflow
](
https://www.tensorflow.org/guide/using_gpu
)
, we can test whether the GPU works with a few lines of codes.
Logging Device placement
## Logging Device placement
To find out which devices your operations and tensors are assigned to, create the session with log_device_placement configuration option set to True.
```
import tensorflow as tf
# Creates a graph.
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
...
...
@@ -145,8 +159,11 @@ c = tf.matmul(a, b)
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
# Runs the op.
print(sess.run(c))
```
You should see the following output:
```
Device mapping:
/job:localhost/replica:0/task:0/device:GPU:0 -> device: 0, name: Tesla K40c, pci bus
id: 0000:05:00.0
...
...
@@ -155,4 +172,4 @@ a: /job:localhost/replica:0/task:0/device:GPU:0
MatMul: /job:localhost/replica:0/task:0/device:GPU:0
[[ 22. 28.]
[ 49. 64.]]
```
\ No newline at end of file
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment