Get TensorFlow Build Information

Get TensorFlow Build Information

Obtaining TensorFlow build information can be helpful for several reasons. It helps identify compatibility issues, ensuring that your code works seamlessly across different TensorFlow versions. The build information provides insights into hardware and software configurations, enabling code optimization and leveraging specific optimizations available in your TensorFlow build. This tutorial explains how to get TensorFlow build information.

In the following code, we retrieve detailed build information about the TensorFlow installation, such as CUDA and cuDNN version (if applicable), CUDA compute capabilities, and other relevant details. The build information is printed to the console.

import tensorflow as tf

info = tf.sysconfig.get_build_info()
print(info)

Here's an example of the output you might see when running the provided code:

OrderedDict([('cpu_compiler', '/dt9/usr/bin/gcc'), ('cuda_compute_capabilities', ['sm_35', 'sm_50', 'sm_60', 'sm_70', 'sm_75', 'compute_80']), ('cuda_version', '11.8'), ('cudnn_version', '8'), ('is_cuda_build', True), ('is_rocm_build', False), ('is_tensorrt_build', True)])

Leave a Comment

Cancel reply

Your email address will not be published.