How to Fix ROCm / PyTorch Memory Faults on AMD GPUs (Segmentation Fault / Page Not Present)

Let me get straight to the point: this issue drained days of my life, but I finally found the solution.