NVIDIA / NVIDIA/apex

[BUG] Apex otimized SyncBatchnormFunction crashes with track_running_stats=False

Open
#1,071 1 comment 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

If track_running_stats=False, SyncBatchnormFunction crashes as it tries to check the dtype or data of running_mean and running_variance that are both None.

The bug is located here: https://github.com/NVIDIA/apex/blob/e2083df5eb96643c61613b9df48dd4eea6b07690/apex/parallel/optimized_sync_batchnorm_kernel.py#L53.

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 in apex/parallel/optimized_sync_batchnorm_kernel.py at line 53 and inspect how SyncBatchnormFunction handles running_mean and running_variance when track_running_stats=False. Reproduce that configuration and verify the function no longer crashes when both values are None.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
distributed-systems, machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.