Ci-dessous, les différences entre deux révisions de la page.
— |
ressources:ressources:tensorflowold [2019/06/11 18:01] (Version actuelle) equemene créée |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ====== Tensorflow ====== | ||
+ | |||
+ | <note important>Cette accès à Tensorflow reste disponible mais il est préférable d'exploiter la nouvelle version accessible via Conda</note> | ||
+ | |||
+ | L'environnement [[https://www.tensorflow.org/|Tensorflow]] a été installé cet été au Centre Blaise Pascal. | ||
+ | |||
+ | Deux environnements étaient disponibles mais seul l'environnement permettant d'exploiter les cartes GPU à base de circuit Nvidia a été installée. La version courante déployée est la 1.10. | ||
+ | |||
+ | ===== Configuration d'exploitation ===== | ||
+ | |||
+ | L'environnement Tensorflow disponible exige une version spécifique de CUDA, la 9.0 minimum. | ||
+ | |||
+ | Pour la charge dans le SIDUS standard du CBP:<code>. /usr/share/modules/init/bash | ||
+ | module load cuda/9.0 | ||
+ | </code> | ||
+ | |||
+ | ===== Exemple ===== | ||
+ | |||
+ | L'exemple suivant, fourni par le [[https://www.tensorflow.org/|site officiel]], permet de rapidement juger du fonctionnement de l'environnement. Il nécessite le lancement de l'interpréteur python : | ||
+ | <code> | ||
+ | # Python | ||
+ | import tensorflow as tf | ||
+ | hello = tf.constant('Hello, TensorFlow!') | ||
+ | sess = tf.Session() | ||
+ | print(sess.run(hello)) | ||
+ | </code> | ||
+ | |||
+ | A l'exécution de la première ligne, vous pouvez avoir un message d'erreur sans importance : | ||
+ | <code>/usr/lib/python2.7/dist-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. | ||
+ | from ._conv import register_converters as _register_converters | ||
+ | </code> | ||
+ | |||
+ | A l'exécution de la seconde ligne, l'environnement détecte la carte graphique susceptible d'être exploitée :<code> | ||
+ | 2018-08-21 11:24:28.475954: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:897] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero | ||
+ | 2018-08-21 11:24:28.476656: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1405] Found device 0 with properties: | ||
+ | name: GeForce GTX TITAN major: 3 minor: 5 memoryClockRate(GHz): 0.8755 | ||
+ | pciBusID: 0000:06:00.0 | ||
+ | totalMemory: 5.94GiB freeMemory: 5.83GiB | ||
+ | 2018-08-21 11:24:28.476704: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1484] Adding visible gpu devices: 0 | ||
+ | 2018-08-21 11:24:34.039086: I tensorflow/core/common_runtime/gpu/gpu_device.cc:965] Device interconnect StreamExecutor with strength 1 edge matrix: | ||
+ | 2018-08-21 11:24:34.039883: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0 | ||
+ | 2018-08-21 11:24:34.039922: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] 0: N | ||
+ | 2018-08-21 11:24:34.040245: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1097] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 5626 MB memory) -> physical GPU (device: 0, name: GeForce GTX TITAN, pci bus id: 0000:06:00.0, compute capability: 3.5) | ||
+ | </code> | ||
+ | Dans l'exemple ci-dessus, il s'agit d'une carte GeForce GTX TITAN avec 5.94GiB de RAM. | ||
+ | |||
+ | La dernière ligne permet s'assurer que la session fonctionne de manière nominal en affichant :<code> | ||
+ | Hello, TensorFlow! | ||
+ | </code> | ||
+ | |||
+ | Une grande variété de [[https://www.tensorflow.org/tutorials/|tutoriels]] en ligne permettent de vérifier le bon fonctionnement. | ||
+ | |||
+ | <note important>L'application TensorFlow sur GPU requiert une version de GPU avec des capacités minimales pour fonctionner (compute capability de 3.5) : sur les 50 GPU accessibles au CBP, certains ne supportent pas cette capacité</note> | ||
+ | |||
+ | ===== GPU du CBP validés pour TensorFlow ===== | ||
+ | |||
+ | * circuits Kepler : GTX Titan, GTX 780, GTX 780Ti, Tesla K40, Tesla K80 | ||
+ | * circuits Maxwell : GTX 980Ti | ||
+ | * circuits Pascal : GTX 1060, GTX 1070, GTX 1080, GTX 1080Ti, Tesla P100 | ||
+ | |||
+ | ===== GPU du CBP invalidés pour TensorFlow ===== | ||
+ | |||
+ | * circuits GT200 : Quadro FX4000, Tesla C1060 | ||
+ | * circuits Fermi : GTX 560Ti, Quadro 4000 | ||
+ | * circuits Kepler : GTX 680, GTX 690, | ||
+ | * circuits Maxwell : GTX 960, GTX 970, GTX980 | ||
+ | |||