std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();
model.forward(inputs).toTensor();
cudaDeviceSynchronize(); // declared in cuda.h
std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();

This is my solution to measure elapsed time for model computation when using GPU.
If there is a better way, plz suggest me.
Thanks!