myco.env¶
Routines for querying compute environment resources, like gpu count.
assert_gpu_available()
¶
Ensure a GPU is available for training or application.
Source code in myco/env.py
27 28 29 30 |
|
count_available_gpus()
¶
Determine number of GPUs available.
Source code in myco/env.py
9 10 11 |
|
count_available_xla()
¶
Checks for XLA devices, which are typically TPUs. See www.tensorflow.org/xla
Source code in myco/env.py
20 21 22 23 24 |
|
get_gce_info(parameters=['name', 'machine-type'])
¶
Get GCE metadata, like project, instane name, and machine type
Source code in myco/env.py
42 43 44 45 46 47 48 49 50 51 52 53 |
|
list_available_gpus()
¶
Get all GPU device names.
Source code in myco/env.py
14 15 16 17 |
|
on_gce()
¶
Check if running a GCE instance via DNS lookup to metadata server.
Source code in myco/env.py
33 34 35 36 37 38 39 |
|