mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-10 07:28:15 -05:00
removed unnecessary 'isinstance(data, UOp)' check (#10605)
This commit is contained in:
@@ -163,7 +163,7 @@ class Tensor(MathTrait):
|
||||
# data might be on a different device
|
||||
if isinstance(device, str): self.lazydata:UOp = data if data.device == device else data.copy_to_device(device)
|
||||
# if device is a tuple, we should have/construct a MultiLazyBuffer
|
||||
elif isinstance(data, UOp) and isinstance(data.device, str): self.lazydata = Tensor(data).shard(device).lazydata
|
||||
elif isinstance(data.device, str): self.lazydata = Tensor(data).shard(device).lazydata
|
||||
else:
|
||||
assert data.device == device, f"MultiLazyBuffer device mismatch, {data.device} != {device}"
|
||||
self.lazydata = data
|
||||
|
||||
Reference in New Issue
Block a user