mindspore-ai / mindspore-ai/hyper-parallel

[fully_shard]注册PostBackwardHook时,输入requires_grad属性跳变

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

Nobody has claimed this yet.

Dominant language
Python
Stars
53
Forks
63
Avg merge
23h 45m
Merged PRs (30d)
63

Description

该问题是怎么引起的?

在注册PostBackwardHook时,调用Autograd.Function输入中,既有需要求导的非叶子节点,也有不需要求导的非叶子节点,生成的输出中所有非叶子节点的requires_grad全变成True,不符合预期

重现步骤
报错信息

schema_version: 1
source: gitcode
gitcode_repo: mindspore/hyper-parallel
gitcode_issue: 66
source_url: https://gitcode.com/mindspore/hyper-parallel/issues/66

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 locating the fully_shard PostBackwardHook and Autograd.Function handling, then reproduce the described case with both gradient-requiring and non-gradient-requiring non-leaf inputs. Verify how requires_grad is propagated to outputs; done means the two input categories retain the expected behavior. The issue provides no file or test path, so project navigation and a focused reproduction are needed first.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.