Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
yanboliang committed Jul 21, 2023
1 parent defae21 commit 06ef382
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torch/_refs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4639,12 +4639,12 @@ def logspace(
requires_grad: bool = False,
) -> TensorLikeType:
# NB: NumPy doesn't have this cast
if prims.utils.is_integer_dtype(dtype):
if prims.utils.is_integer_dtype(dtype or torch.get_default_dtype()):
if isinstance(start, FloatLike):
start = sym_int(start)
if isinstance(end, FloatLike):
end = sym_int(end)

if py_any(isinstance(arg, complex) for arg in (start, end, steps)):
default_complex_dtype = utils.corresponding_complex_dtype(
torch.get_default_dtype()
Expand Down

0 comments on commit 06ef382

Please sign in to comment.