-
Notifications
You must be signed in to change notification settings - Fork 26
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
[dipu] partially refactor CMakeLists.txt and tidy almost all source code. #598
[dipu] partially refactor CMakeLists.txt and tidy almost all source code. #598
Conversation
set(GENERATED_KERNELS "${CMAKE_CURRENT_SOURCE_DIR}/aten/ops/AutoGenedKernels.cpp") | ||
set(GENERATED_KERNELS_SCRIPT "${PROJECT_SOURCE_DIR}/scripts/autogen_diopi_wrapper/autogen_diopi_wrapper.py") | ||
set(GENERATED_KERNELS_CONFIG "${PROJECT_SOURCE_DIR}/scripts/autogen_diopi_wrapper/diopi_functions.yaml") | ||
set(GENERATED_KERNELS_VENDOR "${PROJECT_SOURCE_DIR}/third_party/DIOPI/impl/${UsedVendor}/convert_config.yaml") |
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.
目前这里的 config 采用了旧版逻辑。但我们还提供了使用使用外部 DIOPI 的配置,这种实现并不兼容外部 DIOPI 的情况。
考虑到目前只有 s2 使用外部 DIOPI,并且只有 camb 在用 convert_config.yaml
,因此暂时没有问题。关于后续修复方法,可以考虑从 targets 绑定的变量获取 convert_config.yaml
路径。
或者再确认一下是否还有使用外部 DIOPI 的需求,能移除最好,毕竟维护起来挺麻烦的,容易像这里一样遗漏。
file(GLOB BASE_FILES base/*.cpp) | ||
file(GLOB UTILS_FILES utils/*.cpp) | ||
file(GLOB DIOPI_RT_FILES diopirt/*.cpp) | ||
file(GLOB PROFILER_FILES profiler/*.cpp) |
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.
We do not recommend using GLOB to collect a list of source files from your source tree. —— CMake: file
另外,这样修改之后,每次新增 cpp 文件都需要修改此处的 CMakeLists.txt
了。
4033ae4
to
119731a
Compare
9fdc1a9
to
5852a35
Compare
1c6fa69
to
dd955c4
Compare
dd955c4
to
dea03dc
Compare
这次的 PR 内容比较多,主要包含四类事项:
"
与<
)还有一些问题:
const_cast
?csrc_dipu/runtime/distributed/c10dOps.cpp 是否可以可以将经过测试不可以随便改,需要与 Python 层保持接口一致barrier_dipu
参数 tensor 修改为const &
以及一些经验: