{ "cells": [ { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "import os\n", "os.environ['LD_LIBRARY_PATH'] = '/usr/local/cuda-9.1/targets/x86_64-linux/lib/'\n", "from tensorflow.python.client import device_lib" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[name: \"/device:CPU:0\"\n", " device_type: \"CPU\"\n", " memory_limit: 268435456\n", " locality {\n", " }\n", " incarnation: 8024912505704686755, name: \"/device:GPU:0\"\n", " device_type: \"GPU\"\n", " memory_limit: 227540992\n", " locality {\n", " bus_id: 1\n", " links {\n", " }\n", " }\n", " incarnation: 17421789173799713590\n", " physical_device_desc: \"device: 0, name: GeForce GTX 960M, pci bus id: 0000:01:00.0, compute capability: 5.0\"]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "device_lib.list_local_devices()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.2" } }, "nbformat": 4, "nbformat_minor": 2 }