Saved on libtorch, load on libtorch

I try to load my trained model on libtorch CUDA.
This is my model (How to save and Load)

struct NetImpl : torch::nn::Module{
  NetImpl() :

Net model;
device = torch::Device(torch::kCUDA, numDev);
torch::load(model, saveAndLoad + "/");
torch::load(optimizer, saveAndLoad + "/");
torch::save(model, saveAndLoad + "/");
torch::save(optimizer, saveAndLoad + "/");

It is work on same device number GPU.
If load the model on across device there is error.

I found document about “map_location”.
It is a function that allocate device number when load model on python.
But, I can’t find how to set map_location on C++. please help me.