Repository navigation
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.
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.
🔵 suggestion: 修复本身正确:
project()已启用 CUDA 语言,add_library会让 nvcc 编译main.cu。一个非阻塞的可选建议:add_subdirectory(csrc)已在第 46 行执行,此处可直接复用add_deep_ep_library(deep_ep_indexing_cuda csrc/indexing/main.cu),让 indexing 目标与csrc/kernels/CMakeLists.txt中真实内核目标的编译参数一致(C++17 /CUDA_SEPARABLE_COMPILATION ON/ 链接nvshmem_device),IDE 语义分析环境会更贴近实际。注意原cuda_add_library会读取第 8 行的全局CUDA_SEPARABLE_COMPILATION ON,而原生add_library不会,所以该目标现在不带-rdc=true;我已确认main.cu包含的impls/*.cuh中所有__global__均为模板且未实例化,不会产生设备代码,因此当前改法不会引入 unresolved extern 问题。可与描述中提到的其他 FindCUDA 遗留(CUDA_NVCC_FLAGS、CUDA_TOOLKIT_ROOT_DIR)一并放到后续 PR。🤖 v5