NVIDIA / NVIDIA/apex

Loss_scale = "dynamic" severely reduces training speed.

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

Nobody has claimed this yet.

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

Description

I'm using apex for training a network on 4 GPUs. I'd like to use the O1 optimization level how ever it was actually slower than the fp32 training. I narrowed it down the the loss_scale being set to "dynamic" instead of a single float. Is this expected when I see my train step time reduced from 1.9s to 1s when using a float value vs "dynamic"? Is there something I can do to utilize dynamic loss scaling but still maintain the training speed similar to when I use a single float value?

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.

Research direction

Start by reproducing the reported O1 training-step timings on four GPUs with a fixed loss scale and with dynamic loss scaling. Compare the runs and inspect the dynamic-scaling behavior to determine whether the slowdown is expected; document the result and any supported configuration that preserves training speed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.