MPS: Limiting threads to different thresholds for multi-GPU processes

A question regarding MPS usage:
If a process, p1 is running on a 4-GPU machine and is using all the 4 GPUs, but I want to limit the thread usage i.e. CUDA_MPS_ACTIVE_THREAD_PERCENTAGE for p1 for one of the GPUs instead of all of the GPUs. Does MPS allow it ? If yes, how can I achieve it?

MPS allows it via use of the driver API cuCtxCreate. Refer to sections and 5.2 of the CUDA MPS doc. Furthermore, new MPS capability was added in CUDA 11.5 so I recommend using CUDA 11.5 (or newer) if possible.