# mypy: allow-untyped-defsfromtorch.distributed.tensor.debug._comm_modeimportCommDebugModefromtorch.distributed.tensor.debug._visualize_shardingimportvisualize_sharding__all__=["CommDebugMode","visualize_sharding"]def_get_sharding_prop_cache_info():""" Get the cache info for the sharding propagation cache, used for debugging purpose only. This would return a named tuple showing hits, misses, maxsize and cursize of the sharding propagator cache. """fromtorch.distributed.tensor._apiimportDTensorreturn(DTensor._op_dispatcher.sharding_propagator.propagate_op_sharding.cache_info()# type:ignore[attr-defined])# Set namespace for exposed private namesCommDebugMode.__module__="torch.distributed.tensor.debug"visualize_sharding.__module__="torch.distributed.tensor.debug"
Docs
Access comprehensive developer documentation for PyTorch
To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.