Skip to content

Conversation

@fangfangssj
Copy link
Contributor

@fangfangssj fangfangssj commented Aug 23, 2025

PR Category

Feature Enhancement

Description

  1. 更新了ci中torch的版本,换为最新版的2.9,torch在这个版本里将_vmap_increment_nesting从torch._C._functorch移动到torch._functorch.predispatch下,让_vmap_increment_nesting可以被Dynamo跟踪到
  2. 增加了移除autocast的步骤,这个移除计算图中的混合精度的处理,autocast相关的函数不可以被Dynamo跟踪
  3. 将检查workspace_path移动到初始化下,避免重复调用
  4. 新增了一些dynamo对应的config,减少捕捉时的子图打断

amp.autocast和_vmap_increment_nesting都是上下文管理器,在这两个函数中,都没有数据流的输入输出,只有函数对内部堆栈的变量的处理,只能是修改torch的源码来对其进行特殊处理才可以被跟踪到

@paddle-bot
Copy link

paddle-bot bot commented Aug 23, 2025

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Aug 23, 2025
@fangfangssj fangfangssj changed the title [Feature Enhancement] update torch version and add amp pass 【Hackathon 9th No.102】[Feature Enhancement] update torch version and add amp pass Aug 24, 2025
def wrapper(model: torch.nn.Module):
assert isinstance(model, torch.nn.Module), f"{type(model)=}"

class GraphExtractor:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个类可以不嵌入到函数里定义吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#236 中修改

@lixinqi lixinqi merged commit 01f909e into PaddlePaddle:develop Sep 11, 2025
3 checks passed
JewelRoam pushed a commit to JewelRoam/GraphNet that referenced this pull request Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants