【训练营】基于 CTest + gtest 的测试体系搭建与工程化集成#120
Open
luoyueyuguang wants to merge 5 commits intoInfiniTensor:masterfrom
Open
【训练营】基于 CTest + gtest 的测试体系搭建与工程化集成#120luoyueyuguang wants to merge 5 commits intoInfiniTensor:masterfrom
luoyueyuguang wants to merge 5 commits intoInfiniTensor:masterfrom
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Contributor
|
1.请不要用 merge 操作,统一使用 rebase 同步最新修改; |
chen2021673
reviewed
Mar 18, 2026
| add_subdirectory(third_party/glog) | ||
| add_compile_definitions(GLOG_USE_GLOG_EXPORT=1) | ||
| include_directories(${glog_SOURCE_DIR}/src) | ||
| include_directories(${glog_BINARY_DIR}/glog) |
| file(GLOB_RECURSE SRC ${PROJECT_SOURCE_DIR}/infini_train/src/*.cc) | ||
| list(FILTER SRC EXCLUDE REGEX ".*kernels/cpu/.*") | ||
| list(FILTER SRC EXCLUDE REGEX ".*runtime/cuda/.*") | ||
| list(FILTER SRC EXCLUDE REGEX ".*ccl/cuda/.*") |
Contributor
There was a problem hiding this comment.
这里的逻辑应该是
if(NOT USE_CUDA)
list(FILTER SRC EXCLUDE REGEX ".*runtime/cuda/.*")
list(FILTER SRC EXCLUDE REGEX ".*ccl/cuda/.*")
endif()
否则会出现编译错误
| @@ -0,0 +1,161 @@ | |||
| # Autograd tests | |||
Contributor
There was a problem hiding this comment.
这版的风险是新增测试的接入成本和漏配风险都比较高。新增一个普通 autograd CPU 测试,至少要手动写:
add_autograd_test(...)
add_test(...)
set_tests_properties(... LABELS ...)
建议简化。例如把功能整合到一个函数里,新增测试只调用一次;或者考虑使用gtest_discover_tests,不用再手工写 add_test() 和 set_tests_properties()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.