I am relatively new to GPU hardware. I used to use Google Colab a lot for LLM training using pytorch, and I can specify the runtime type (CPU and GPU) to control where my Python code to run on. Recently, I've got a workstation which has both a CPU and GPU. How should I control and switch Python's execution between CPU a versus GPU as I wish? Through code or configuration? Continue reading...