Skip to content

Commit cb24a5d

Browse files
committed
fix dtype check
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
1 parent 62169fb commit cb24a5d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

thunder/torch/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,7 @@ def unsqueeze(a: TensorLike, /, dim: int) -> TensorLike:
14961496
@torchsymbol(torch.Tensor.view, is_method=True)
14971497
def view(a: TensorLike, /, *shape) -> TensorLike:
14981498
shape = utils.extract_shape_from_varargs(shape)
1499-
if len(shape) == 1 and isinstance(shape[0], torch.dtype):
1499+
if len(shape) == 1 and isinstance(shape[0], (torch.dtype, dtypes.dtype)):
15001500
dst_dtype = to_dtype(shape[0])
15011501
src_dtype = to_dtype(a.dtype)
15021502
utils.check(

0 commit comments

Comments
 (0)