you could just create a tensor of size BxCxHxW, instead of pushing multiple tensors of size 1xCxHxW to your  std::vector<torch::jit::IValue>. For example
auto module = torch::jit::load("../model.pt");

// Thats how to forward a whole batch.
std::vector<torch::jit::IValue> inputs;
inputs.push_back(torch::ones({10, 3, 224, 224})); // BxCxHxW
module->forward(inputs);

// You only need to push back multiple inputs if, say your forward takes two arguments, then
std::vector<torch::jit::IValue> inputs;
inputs.push_back(torch::ones({1, 3, 224, 224})); // 1xCxHxW
inputs.push_back(torch::ones({1, 3, 224, 224})); // 1xCxHxW
module->forward(inputs);