pytorch
fc664ac2 - [sharded_tensor] easier initialization for Shard (#66351)

Commit
3 years ago
[sharded_tensor] easier initialization for Shard (#66351) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/66351 This add the ability for use to just provide shard_offsets and optionally rank, to construct a local shard, instead of knowing there's a ShardedMetadata. Under the hood, we will construct the ShardedMetadata by inferring shard_lengths and device from the local tensor. ghstack-source-id: 141742410 Test Plan: test_local_shards Reviewed By: pritamdamania87 Differential Revision: D31519919 fbshipit-source-id: 8f3b4682ffc74b79b41076f3f4b832f4cacda49d
Author
Parents
Loading