| fixing experimental option and ReduceScatter BIRS Co-authored-by: Davydov_Danil<davydov.danil1@huawei.com> # message auto-generated for no-merge-commit merge: !2185 merge ReduceScatterBIRS_fix into master fixing experimental option and ReduceScatter BIRS Created-by: Davydov_Danil Commit-by: Davydov_Danil Merged-by: cann-robot Description: ## Description Fixes: - build.sh 的 build_device() 未转发 ENABLE_EXPERIMENTAL,导致 experimental BIRS 执行器未编入 device 库,运行时 ReduceScatter 失败 - ReduceScatter BIRS 多层忽略通信返回值导致失败后仍继续执行 Build-system changes required for the first fix: - Third-party dependency pin bump: cann-cmake master-044 -> master-051 in cmake/fetch_cann_cmake.cmake (URL_HASH 2d8827b3... -> f50ea0bf...). Reason: only master-051's add_cann_device_project supports extra-argument passthrough (cmake_parse_arguments(CANN "" "" "EXT_ARGS" ${ARGN}) + list(APPEND EP_CMAKE_ARGS ${CANN_EXT_ARGS}) in function/prepare.cmake); master-044 has no EXT_ARGS. This is the prerequisite for CMakeLists.txt: add_cann_device_project(hccl EXT_ARGS -D ENABLE_EXPERIMENTAL=${ENABLE_EXPERIMENTAL}), i.e. the flag reaches the device ExternalProject without keeping an in-repo override copy of add_cann_device_project. Pin verified: SHA256 of https://raw.gitcode.com/cann/cmake/archive/refs/heads/master-051.tar.gz == f50ea0bf7f80ce9e664f26693252aee8d2a42438a80bc2cd335741dc4b3b834f. 044 -> 051 side effects reviewed (new __cann_check_build_env() gate: gcc >= 7.3.0 + python3; convert_dependencies_to_package_formats renamed to a private __cann_ helper; device EP no longer forwards -D VERSION_INFO): hccl does not call the renamed function, and cmake/device/CMakeLists.txt includes version.cmake directly, so host and device builds are unaffected. - cmake/device/CMakeLists.txt: added option(ENABLE_EXPERIMENTAL "Enable experimental features" OFF) so the standalone device project accepts the forwarded flag and gates add_subdirectory(experimental/ops). - Removed the now-redundant if(NOT ENABLE_EXPERIMENTAL) return() guards from 6 leaf CMakeLists under experimental/ops (op_common, op_common/template, op_common/topo, reduce_scatter, reduce_scatter/birs, reduce_scatter/birs/template), per review. Gating stays single-sourced: the guard in experimental/ops/CMakeLists.txt plus the two add_subdirectory call sites (root CMakeLists.txt for host, cmake/device/CMakeLists.txt for device); leaf target_sources(hccl ...) remains protected by if(TARGET hccl), so the device build (no hccl target) is unaffected. - experimental/ops/all_reduce/example: GetAlgNetMeta() signature adapted to the current base-class interface (added const OpParam& param). ## Related Issue https://gitcode.com/cann/hccl/issues/324 https://gitcode.com/cann/hccl/issues/380 ## Testing Testing with the hccl-checker tool via ST tests "/test/st/algorithm/testcase/reduce_scatter_testcase_a3.cc" Single-node: ReduceScatterBirs was deployed on one Atlas A3 node with RankSize set between 4 and 16. Example of ReduceScatterBIRS output from hccl_test for RankSize 16:  ## Documentation Update <!-- If this PR includes documentation updates, indicate them here. For example: Updated the README.md file. --> - docs/zh/build/build.md and docs/en/build/build.md: third-party software table, cann-cmake row master-044 -> master-051. Download source switched from the cann-3rd OBS bucket (cmake-master-051.tar.gz is not published there — HTTP 403) to the raw.gitcode.com archive, whose SHA256 matches the pin declared in cmake/fetch_cann_cmake.cmake. ## Type Label <!-- [x] to select --> - [x] Bug fix - [ ] New feature - [ ] Performance optimization - [ ] Documentation update - [ ] Other, please describe: See merge request: cann/hccl!2185 | 1 个月前 |