diff --git a/tensorflow/python/framework/test_util.py b/tensorflow/python/framework/test_util.py index 8c1eaf05baf954..e707dbd5db742b 100644 --- a/tensorflow/python/framework/test_util.py +++ b/tensorflow/python/framework/test_util.py @@ -1331,13 +1331,17 @@ def decorated(self, *args, **kwargs): def is_gpu_available(cuda_only=False, min_cuda_compute_capability=None): """Returns whether TensorFlow can access a GPU. + Warning: if not GPU version of the package is installed, the function would + also, return False. Use `tf.test.is_built_with_cuda` to validate if TensorFlow + was build with CUDA support. + Args: - cuda_only: limit the search to CUDA gpus. + cuda_only: limit the search to CUDA GPUs. min_cuda_compute_capability: a (major,minor) pair that indicates the minimum CUDA compute capability required, or None if no requirement. Returns: - True if a gpu device of the requested kind is available. + True if a GPU device of the requested kind is available. """ def compute_capability_from_device_desc(device_desc):