-
Notifications
You must be signed in to change notification settings - Fork 660
【Hackathon 9th No.73】add unit tests for graph_opt_backend #3609
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
【Hackathon 9th No.73】add unit tests for graph_opt_backend #3609
Conversation
|
Thanks for your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive unit tests for the graph optimization backend, testing various graph optimization modes and CUDA graph configurations to ensure consistent model outputs against a NumPy baseline.
- Introduces a new test file with
TestGrpahOptBackendclass to validate graph optimization functionality - Tests dynamic, static, and CINN graph optimization modes both with and without CUDA graph enabled
- Implements a
TinyModelclass withsupport_graph_optimizationdecorator for testing purposes
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
- Fix class name: TestCUDAGrpahSubgraph -> TestCUDAGraphSubgraph
…into test/add_unit_tests_for_graph_opt_backend
…on backend test to eliminate redundant baseline calculations
gongshaotian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…le#3609) * test: add unit tests for graph_opt_backend * refactor(tests): improve graph optimization test structure and readability * fix(tests): correct CUDA graph related typos in test files - Fix class name: TestCUDAGrpahSubgraph -> TestCUDAGraphSubgraph * refactor(test): support attention layer and optimize graph optimization backend test to eliminate redundant baseline calculations * remove some func call --------- Co-authored-by: RAM <[email protected]> Co-authored-by: Tao Luo <[email protected]>
详细描述:本任务中需要补充功能模块 graph_optimization 的单测
测试内容:添加一个单测,测试Numpy实现(BaseLine)、动态图、静态图、CINN、动态图+CudaGraph、静态图+CudaGraph、CINN+CudaGraph 七种情况下精度正常且能对齐
单测名称:test/graph_optimization/graph_opt_backend.py