keras/src/backend/torch/optimizers/torch_parallel_optimizer.py/TorchParallelOptimizer/_backend_increment_gradient_accumulators
class TorchParallelOptimizer:    def _backend_increment_gradient_accumulators(self, grads, acc_grads):
        acc_list = [v.value for v in acc_grads]
        torch._foreach_add_(acc_list, grads, alpha=1.0)