I am trying to access GPU using installed version of tensorflow(2.4.1), but it didn’t work.
After some investigation, I found that we use python 3.9, but tensorflow(2.4.1) build is tested only till python 3.8.
When I checked tensorflow Tested build configurations (Build from source | TensorFlow), I found that tensorflow 2.5 & 2.6 are the only versions tested for python 3.9.
So, I tried to upgrade tensorflow to 2.5.0 and 2.6.0, and I managed to access GPU successfully for both versons. So, we need to upgrade tensorflow to 2.5.0 or 2.6.0(recommended by me).