deepspeedai / deepspeedai/DeepSpeed

[Question] bf16 suppot DeepSpeedCPUAdamOptimizer and performance degradation with multiple instances

Open
#4,687 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
43.1k
Forks
5k
Avg merge
4d 15h
Merged PRs (30d)
112

Description

Hi, I'm trying out DeepSpeedCPUAdamOptimizer and I have a few questions about it.

During my testing, I discovered that DeepSpeedCPUAdamOptimizer does not seem to support bf16. Whenever I run the program, I consistently encounter the error message "interrupted by signal 11: SIGSEGV." Is this behavior expected? Are there any plans to support bf16 in the future?

I also encountered a performance issue when I replaced PyTorch Adam with DeepSpeedCPUAdamOptimizer in my training scripts. The performance seems to be degraded compared to the test script. After inspecting the source code, I noticed that #pragma omp parallel for is used to enable multithreading. However, in my setup where I have multiple GPUs running on a single node, multiple instances of optimizers may compete for CPU resources. Is there any workaround for this issue?

Contributor guide

Open the contributing guide

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 with the DeepSpeedCPUAdamOptimizer implementation, especially the bf16 handling and the #pragma omp parallel for path mentioned in the issue. Reproduce the SIGSEGV with bf16 and benchmark multiple optimizer instances across GPUs against the test script. Done means the support status and performance cause or workaround are established and documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
distributed-systems, machine-learning, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.