MCPcopy Create free account
hub / github.com/OpenGVLab/InternImage / bf16_compress_wrapper

Function bf16_compress_wrapper

classification/ddp_hooks.py:147–182  ·  view source on GitHub ↗

Warning: This API is experimental, and it requires NCCL version later than 2.9.6. This wrapper casts the input gradient tensor of a given DDP communication hook to half-precision `Brain floating point format `_ (``torch.bf

(
    hook: Callable[[Any, dist.GradBucket], torch.futures.Future[torch.Tensor]]
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected