Closed iAlexKai closed 3 years ago
All the warning are listed here: Warning: Encountered known unsupported method torch.is_grad_enabled Warning: Encountered known unsupported method torch.get_default_dtype Warning: Encountered known unsupported method torch.get_default_dtype Warning: Encountered known unsupported method torch.Tensor.has_names Warning: Encountered known unsupported method torch.is_grad_enabled Warning: Encountered known unsupported method torch.is_grad_enabled Warning: Encountered known unsupported method torch.Tensor.iter Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.tolist Warning: Encountered known unsupported method torch.Tensor.has_names Warning: Encountered known unsupported method torch.is_grad_enabled Warning: Encountered known unsupported method torch.Tensor.repr
I have found where such warnings come from: in xxx/site-packages/torch/tensor.py(411)format()
def __format__(self, format_spec):
if self.dim() == 0:
return self.item().__format__(format_spec)
But I don't know where I use the format function...
I've got it, the only reason is that I called print(inputs) in torch2trt_dynamic.py line 514
Thanks for the report, I will add some warnings about print Tensor.
Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item Warning: Encountered known unsupported method torch.Tensor.format Warning: Encountered known unsupported method torch.Tensor.item
I know it's an issue caused by the unrealized method. But I really don't understand where on earth did I use the "Tensor.format", because I have read every single line of my model code and I didn't find any use of "{}".format(model)
Could anyone help me...Thanks so much...
My environment: