Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP][SOT] add faster_guard check #71239

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

gouzil
Copy link
Member

@gouzil gouzil commented Feb 22, 2025

PR Category

Execute Infrastructure

PR Types

Performance

Description

优化 faster_guard 检查逻辑

不再让 test_with_faster_guard 跑两次 func,而是只跑 guard_fnguard_fn.faster_guard, 并检查这两次的结果

TODO:

  • 确认一下是否要在 lookup 调用 guard_fn.faster_guard 的时候 dump_state 一下,目前发现会在 test_sot_resnet.TestResNet.test_resnet_traintest_instruction_translator_cache.TestOpcodeExecutorCache.test_cache_hit 导致 translate_count 变为 2

Copy link

paddle-bot bot commented Feb 22, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Feb 22, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

@SigureMo
Copy link
Member

SigureMo commented Mar 1, 2025

确认一下是否要在 lookup 调用 guard_fn.faster_guard 的时候 dump_state 一下,目前发现会在 test_sot_resnet.TestResNet.test_resnet_train 和 test_instruction_translator_cache.TestOpcodeExecutorCache.test_cache_hit 导致 translate_count 变为 2

确认下是否是报错导致的,因为现在的逻辑里没有对 try-exceptexcept 进行对齐,那么就有可能是在 faster guard 出现了异常导致没有走 assert,而导致 translate count +1

@gouzil
Copy link
Member Author

gouzil commented Mar 3, 2025

确认下是否是报错导致的,因为现在的逻辑里没有对 try-exceptexcept 进行对齐,那么就有可能是在 faster guard 出现了异常导致没有走 assert,而导致 translate count +1

确实都是因为报错导致的,test_instruction_translator_cache 是因为 mock 没有生成 faster_guard. test_sot_resnet 是因为 [Cache] Guard function error: <built-in method check of PyCapsule object at 0x101fda840> returned a result with an exception set

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants