TensorRT
TensorRT copied to clipboard
🐛 [Bug] No type to cast for Uninitialized type
Bug Description
We are getting this kind of ivalue type https://github.com/pytorch/pytorch/blob/b34b192d6b97325c9f78e5995c48c8498ede34bd/aten/src/ATen/core/ivalue.h#L159, however, when it's used by a later subgraph in fallback shape analysis, there is no available types that we can cast to.
For example, we have this subgraph:
Graph: graph(%out_dict.1 : Dict(str, Tensor),
%2 : Tensor,
%attributes_manager_out.1 : Dict(str, Tensor),
%outputs.1 : Dict(str, Tensor)):
The second input is a uninitialized type, which is taken as a tensor for usage, but we will get this kind of error if we convert it to tensor:
terminate called after throwing an instance of 'c10::Error'
what(): Expected Tensor but got Uninitialized
Expected behavior
Find any available type that we can use to cast.