Skip to content

add some compat API tests#40

Open
youge325 wants to merge 2 commits intoPFCCLab:masterfrom
youge325:cLast
Open

add some compat API tests#40
youge325 wants to merge 2 commits intoPFCCLab:masterfrom
youge325:cLast

Conversation

@youge325
Copy link
Contributor

@youge325 youge325 commented Feb 27, 2026

新增 sum、t、t_、transpose_、view_as、coalesce、is_variable、item 接口测试
image

Copilot AI review requested due to automatic review settings February 27, 2026 03:44
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

该 PR 为 ATen/compat 接口补充了一批 C++ 侧的 gtest 用例,通过将关键结果写入 /tmp/paddle_cpp_api_test/<exe>.txt 来做 Paddle/Torch 对齐验证。

Changes:

  • 新增 view_astranspose/transpose_t/t_toitemeyecoalesce 等接口的测试用例文件。
  • 扩展 SumTest.cpp,新增 Tensor::sum(...) 成员函数形式的覆盖。

Reviewed changes

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

Show a summary per file
File Description
test/ops/ViewAsTest.cpp 新增 view_as 形状变换与共享存储语义测试
test/ops/TransposeTest.cpp 新增 transpose/transpose_(含负维、原地)测试
test/ops/ToTest.cpp 新增 to(...) 多重载/可选参数覆盖测试
test/ops/TTest.cpp 新增 t/t_transpose 等价性测试
test/ops/SumTest.cpp 增加 Tensor::sum(...) 成员函数形式的测试覆盖
test/ops/ItemTest.cpp 新增 item() / item<T>() 标量提取测试
test/ops/EyeTest.cpp 新增 eye 不同形状/不同 dtype 的测试
test/ops/CoalesceTest.cpp 新增稀疏 COO coalesce/_nnz/_values/is_coalesced 测试

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants