Input dims and input type for speed benchmarking on Android


I have a custom PyTorch model, the inputs are of the model as like this:
model(torch.randint(0, 10,(1,1)), torch.rand(1, 51, 2048), torch.randint(0, 10,(1, 1))).
I am trying to speed benchmark this model with Android, but I am unable to understand how I should use the “input_dims” and “input_type” parameters as this model involves a mix of float and integer types.


An update:
I checked the file. It specifies “If multiple input needed, use semicolon to separate the dimension of different tensors.”

Therefore, I tried: --input_dims=“1,1;1,51,2048;1,1” --input_type=“int64;float;int64”.

This results in error:
terminating with uncaught exception of type c10::Error: [enforce fail at] input_dims_list.size() == input_type_list.size(). 1 vs 0. Input dims and type should have the same number of items.

(no backtrace available)


Hi @prerna, what’s the full command you are running?