Diff Coverage

Diff: origin/master...HEAD, staged and unstaged changes

Source File Diff Coverage (%) Missing Lines
hyper_parallel/core/fully_shard/hsdp_scheduler.py 96.8% 563
hyper_parallel/core/fully_shard/hsdp_state.py 81.8% 436-437
hyper_parallel/core/fully_shard/hsdp_scheduler.py
559
560
561
562
563
564
565
566
567
        speculative prefetch may therefore have no pre-backward consumer.
        """
        state = self.hsdp_state
        if state is None:
            return
        for param in state.hsdp_params:
            context = param.allgather_comm_ctx
            if context.allgather_handle is None and context.allgather_output is None:
                continue
hyper_parallel/core/fully_shard/hsdp_state.py
432
433
434
435
436
437
438
439
440
441
                    self,
                    prev_group.hsdp_params,
                )
                for hsdp_param in prev_group.hsdp_params:
                    reduced_grad = hsdp_param.reduce_scatter_output()
                    hsdp_param.all_reduce_source_replicate_grad_inplace(reduced_grad, torch.distributed.ReduceOp.SUM)
                    hsdp_param.clear_reduce_scatter_output()
                    if hsdp_param.unsharded_accumulated_grad_data is not None:
                        hsdp_param.unsharded_accumulated_grad = None
                    elif hsdp_param.unsharded_param.grad is not None: