If nvidia control panel is installed then ->
Right-click on the desktop → Select NVIDIA Control Panel.
Go to Manage 3D Settings.
Under Preferred Graphics Processor, select High-Performance NVIDIA GPU.
Apply changes and restart.
If you have installed packages and initialize gpu (cuda) in your code then follow these steps if gpu is not utilized .