|TensorFlow 1 version||View source on GitHub|
Returns whether TensorFlow was built with CUDA (GPU) support.
Compat aliases for migration
See Migration guide for more details.
This method should only be used in tests written with
typical usage is to skip tests that should only run with CUDA (GPU).
if not tf.test.is_built_with_cuda():
self.skipTest("test is only applicable on GPU")
self.assertEqual(tf.math.add(1.0, 2.0), 3.0)
TensorFlow official binary is built with CUDA.