progress: common data directory
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"execution_count": 3,
|
||||
"id": "000d047d-3dfd-48cb-a3c3-bd1ad7c78b71",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
@@ -12,28 +12,22 @@
|
||||
"text": [
|
||||
"TensorFlow version: 2.16.1\n",
|
||||
"GPUs detected: 1\n",
|
||||
" - /physical_device:GPU:0\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"2024-06-03 21:52:43.785816: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:998] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355\n",
|
||||
"2024-06-03 21:52:43.795907: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:998] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355\n",
|
||||
"2024-06-03 21:52:43.799970: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:998] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355\n"
|
||||
" - PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import os\n",
|
||||
"import tensorflow as tf\n",
|
||||
"\n",
|
||||
"os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'\n",
|
||||
"\n",
|
||||
"def get_available_gpus():\n",
|
||||
" gpus = tf.config.list_physical_devices('GPU')\n",
|
||||
" if gpus:\n",
|
||||
" print(f\"GPUs detected: {len(gpus)}\")\n",
|
||||
" for gpu in gpus:\n",
|
||||
" print(f\" - {gpu.name}\")\n",
|
||||
" print(f\" - {gpu}\")\n",
|
||||
" else:\n",
|
||||
" print(\"No GPUs detected.\")\n",
|
||||
"\n",
|
||||
@@ -44,11 +38,23 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 2,
|
||||
"id": "324dc7a1-61b8-4384-bfed-4385e7dbe49d",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"gpus = tf.config.list_physical_devices('GPU')\n",
|
||||
"for gpu in gpus:\n",
|
||||
" print(gpu)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
Reference in New Issue
Block a user