LARC asynchronous execution

Open
#636 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python, pytorch

Research direction

The issue only shows the LARC Python step method and describes sequential gradient updates for conv1 and conv2; no file or test is named. Start by locating that step implementation, then determine how asynchronous updates would affect optimizer semantics and how completion should be verified across layers.

Written by the indexing model from the issue text.

Description

Now the LARC code is:

def step(self):
    with torch.no_grad():
        for group in self.optim.param_groups:
            # some code
            for p in group['params']:
                param_norm = torch.norm(p.data)
                grad_norm = torch.norm(p.grad.data)
                adaptive_lr = somecode
                p.grad.data += weight_decay * p.data
                p.grad.data *= adaptive_lr

If the model has 2 layers, conv1 and conv2
The update of conv2 grad is after the conv1. But actually it can asynchronous execution both the update of grad in conv1 and conv2.

Dominant language
Python
Stars
9k
Forks
1.5k
Avg merge
2d 4h
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/apex

All issues in NVIDIA/apex

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.