Solved by adityamnk in post #3 
              
              
                I used something similar to the following code - 
import os
import multiprocessing as mp
import time
import torch

def launch_proc(gpu_id):
    os.environ['CUDA_VISIBLE_DEVICES'] = str(gpu_id)
    import torch
    #Allocate memory on visible GPU
    tensor = torch.Tensor((10**8)*[gpu_id]).cuda()
   …