Please help me understand installation for CUDA on linux

I have installed pytorch-gpu in pycharm . Do i need to install the cuda drivers separately before the installation of pytorch to use the gpu.