U
    d                     @   s*   d dl Z d dlmZ G dd de jZdS )    Nc                   @   s*   e Zd ZdZejejejdddZdS )Sharderap  
    This is an interface which allows user to create more advanced
    sharding strategies that are not easily be composed by the
    `ShardingSpec`.

    :class:`torch.distributed._shard.sharding_plan.ShardingPlan` could
    take an object of the `Sharder` and call `shard` to shard the module,
    then replace the original module with sharded module returned.
    )modulereturnc                 C   s   dS )aq  
        Shard a module base on the implementation of this method, and
        return the sharded version of the module.

        Args:
            module (:class:`torch.nn.Module`):
                The module to apply sharding to.
        Returns:
            A :class:`torch.nn.Module` object that represents a module
            that's already been sharded.
        N )selfr   r   r   D/tmp/pip-unpacked-wheel-ua33x9lu/torch/distributed/_shard/sharder.pyshard   s    zSharder.shardN)	__name__
__module____qualname____doc__abcabstractmethodnnModuler   r   r   r   r   r      s   	r   )r   Ztorch.nnr   ABCr   r   r   r   r   <module>   s   