MCPcopy
hub / github.com/tinygrad/tinygrad / shard_

Method shard_

tinygrad/tensor.py:399–403  ·  view source on GitHub ↗

Shards the tensor across the given devices in place.

(self, devices:tuple[str, ...], axis:int|None=None)

Source from the content-addressed store, hash-verified

397 return Tensor(uop).is_param_(self.is_param)
398
399 def shard_(self, devices:tuple[str, ...], axis:int|None=None) -> Tensor:
400 """
401 Shards the tensor across the given devices in place.
402 """
403 return self.replace(self.shard(devices, axis))
404
405 def shard_like(self, y:Tensor) -> Tensor:
406 """

Calls 2

replaceMethod · 0.95
shardMethod · 0.95