Skip to content

Commit

Permalink
[BugFix] [Relay][Pytorch] Fix missing .dtype (apache#16167)
Browse files Browse the repository at this point in the history
Fix missing `.dtype`
  • Loading branch information
mshr-h authored Nov 28, 2023
1 parent 3eec10f commit 604b263
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/tvm/relay/frontend/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ def new_zeros(self, inputs, input_types):
dtype = _convert_dtype_value(inputs[2])
else:
# if dtype is None, use the dtype of the input tensor
dtype = self.infer_type(inputs[0])
dtype = self.infer_type(inputs[0]).dtype
return self.full_impl(data, 0, dtype)

def full(self, inputs, input_types):
Expand Down Expand Up @@ -898,7 +898,7 @@ def new_full(self, inputs, input_types):
dtype = _convert_dtype_value(inputs[3])
else:
# if dtype is None, use the dtype of the input tensor
dtype = self.infer_type(inputs[0])
dtype = self.infer_type(inputs[0]).dtype

return self.full_impl(data, fill_value, dtype)

Expand Down

0 comments on commit 604b263

Please sign in to comment.