Colaboratory-Free-GPU-(Tesla)-TPU

65 阅读3分钟

Google提供免费的DL加速实践

##Login Colaboratory

##Associate Github with ipynb

##Switch GPU Menu Runtime -> Change runtime type -> Hardware accelerator choose GPU or TPU

##Setup Env (Switch TF 1.x)

Add Code block then run cell

%tensorflow_version 1.x

##Good Luck for you

2020-05-18 03:24:26.547370: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2200000000 Hz
2020-05-18 03:24:26.547848: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2449480 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-05-18 03:24:26.547886: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2020-05-18 03:24:26.557268: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-05-18 03:24:26.755323: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-05-18 03:24:26.756586: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2449d40 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-05-18 03:24:26.756620: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0
2020-05-18 03:24:26.761280: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-05-18 03:24:26.762309: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: 
name: `Tesla P100-PCIE-16GB` major: 6 minor: 0 memoryClockRate(GHz): 1.3285
pciBusID: 0000:00:04.0


2020-05-18 05:55:01.603283: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2300000000 Hz
2020-05-18 05:55:01.603747: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x750a380 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-05-18 05:55:01.603787: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2020-05-18 05:55:01.610886: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-05-18 05:55:01.755367: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-05-18 05:55:01.756323: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x750a540 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-05-18 05:55:01.756359: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Tesla K80, Compute Capability 3.7
2020-05-18 05:55:01.758006: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-05-18 05:55:01.758751: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: 
name: `Tesla K80` major: 3 minor: 7 memoryClockRate(GHz): 0.8235
pciBusID: 0000:00:04.0


2020-09-18 06:16:36.778119: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX512F
2020-09-18 06:16:36.782987: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2000134999 Hz
2020-09-18 06:16:36.783214: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2946a00 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-09-18 06:16:36.783243: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2020-09-18 06:16:36.785143: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-09-18 06:16:36.934795: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-09-18 06:16:36.935494: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2946bc0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-09-18 06:16:36.935524: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Tesla T4, Compute Capability 7.5
2020-09-18 06:16:36.935691: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-09-18 06:16:36.936214: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: 
name: `Tesla T4` major: 7 minor: 5 memoryClockRate(GHz): 1.59
pciBusID: 0000:00:04.0

Tensorboard support

%load_ext tensorboard
%tensorboard --logdir data/log