Skip to content

Conversation

@ooooo-create
Copy link
Contributor

@ooooo-create ooooo-create commented Aug 26, 2025

详细描述:本任务中需要补充功能模块 graph_optimization 的单测
测试内容:添加一个单测,测试Numpy实现(BaseLine)、动态图、静态图、CINN、动态图+CudaGraph、静态图+CudaGraph、CINN+CudaGraph 七种情况下精度正常且能对齐
单测名称:test/graph_optimization/graph_opt_backend.py

图片

Copilot AI review requested due to automatic review settings August 26, 2025 02:41
@paddle-bot
Copy link

paddle-bot bot commented Aug 26, 2025

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Aug 26, 2025
Copy link
Contributor

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.

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 TestGrpahOptBackend class to validate graph optimization functionality
  • Tests dynamic, static, and CINN graph optimization modes both with and without CUDA graph enabled
  • Implements a TinyModel class with support_graph_optimization decorator for testing purposes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

…on backend test to eliminate redundant baseline calculations
Copy link
Collaborator

@gongshaotian gongshaotian left a comment

Choose a reason for hiding this comment

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

LGTM

@gongshaotian gongshaotian merged commit 2396e49 into PaddlePaddle:develop Sep 3, 2025
15 of 17 checks passed
qwes5s5 pushed a commit to qwes5s5/FastDeploy that referenced this pull request Sep 3, 2025
…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]>
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