Skip to content

[Infra:Bugfix] Isolate NeuroPilot directory from GitHub sync#4619

Merged
wangzhaode merged 1 commit into
masterfrom
sync/20260714-1250
Jul 14, 2026
Merged

[Infra:Bugfix] Isolate NeuroPilot directory from GitHub sync#4619
wangzhaode merged 1 commit into
masterfrom
sync/20260714-1250

Conversation

@wangzhaode

Copy link
Copy Markdown
Collaborator

Discussed-in: Merge-Request 28555540 , URL: https://code.alibaba-inc.com/AliNN/AliNNPrivate/codereview/28555540
GitOrigin-RevId: de82056cbbfed0f160a93823874bda2d7ede248a

Description

Module

Type

  • Feature
  • Bugfix
  • Perf
  • Refact
  • Style
  • Doc
  • Test
  • Chore

Checklist

  • Commit message follows [Module:Type] Description format
  • Code compiles without errors
  • Tested on relevant platform(s)
  • No unrelated format or style changes included

Discussed-in: Merge-Request 28555540 , URL: https://code.alibaba-inc.com/AliNN/AliNNPrivate/codereview/28555540
GitOrigin-RevId: de82056cbbfed0f160a93823874bda2d7ede248a
@wangzhaode
wangzhaode merged commit f747d42 into master Jul 14, 2026
9 checks passed

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎬 开拍!MNN Bot 已审查你的变更

Comment thread CMakeLists.txt
ENDIF()
ENDIF()

# Vulkan

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

增加 IF(TARGET MNN_NEUROPILOT) 的防御性检查是一个很好的改进,能够有效避免因 add_subdirectory 在特定平台或缺少依赖时未成功创建目标而引发的构建错误,提升了跨平台兼容性。

不过,在错误处理和优雅降级方面还有改进空间:如果用户显式开启了 MNN_NEUROPILOT,但目标由于环境原因未能生成,当前代码会静默跳过。这可能导致用户误以为 Neuropilot 后端已经成功编译并可用。建议在未找到目标时输出警告信息,例如:

IF(MNN_NEUROPILOT)
    add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/source/backend/neuropilot)
    IF(TARGET MNN_NEUROPILOT)
        target_compile_options(MNNCore PRIVATE -DMNN_NEUROPILOT=1)
        list(APPEND MNN_OBJECTS_TO_LINK $<TARGET_OBJECTS:MNN_NEUROPILOT>)
    ELSE()
        MESSAGE(WARNING "MNN_NEUROPILOT is enabled, but the MNN_NEUROPILOT target was not generated. The Neuropilot backend will be skipped.")
    ENDIF()
ENDIF()

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.

1 participant