Pytorch can use GPU muti-context(MPS) on CPU thread-level?

I want to use Nvidia MPS(Multi Processing Service) and libtorch(c++) on a single process and multi threads (not multi process).

What should i do?