I am wondering if there is a programmatic way to find out against which CUDA and CUDNN version an installed tensorflow version was built?
For example, a compiled Tensorflow installation can return which CXX11_ABI_FLAG was used while it was built:
python -c "import tensorflow as tf; print(tf.CXX11_ABI_FLAG)"
->0
The background is the following:
I'm building Tensorflow OPs according to adding an op with tensorflow binary installation. This uses pre-compiled TF to retrieve the required include paths and compile flags, to make sure that Tensorflow and new Op are compatible.
But since our systems have multiple CUDA & CUDNN versions, I also need to provide the path of the desired versions to the compiler. E.g. for Cuda 8.0 the following flag -L /usr/local/cuda-8.0/lib64/
to specify its path.
But this also opens up an error path, as the Op can now be built successfully with a different CUDA/CUDNN version, which leads to errors during run-time way later.
So I want to create a safety check, to ensure that the CUDA/CUDNN paths lead to the same versions, as the ones Tensorflow was built against.