当前Pull Request已关闭, 关闭人@cftang9999
compile


变更摘要
本 PR 主要围绕 faiss NPU 算子模块的编译与部署方式进行调整:支持「全量编译」与「仅编译/部署 ops 算子模块」两种模式;同时在快速入门测试步骤中新增 CANN 环境变量初始化命令,引入 ascend-toolkit/set_env.sh,确保测试脚本能正确访问 NPU 资源。PR 描述中提到的 cmake_minimum_required 版本不一致问题(3.14/3.16/3.17/3.24.0)因不涉及 docs 目录而未随本 PR 提交。
主要改动
- ops 算子模块编译/部署模式支持: 调整编译流程,使其支持全量编译以及仅编译、部署
faiss/npu/ops算子模块两种方式,便于按需构建部署。 - 新增 CANN 环境变量初始化: 在快速入门的测试步骤中加入
ascend-toolkit/set_env.sh的初始化命令,确保测试脚本能够正确访问 NPU 资源。


🤖 本次改动均为数据 / 生成 / 二进制文件(如测试用例、锁文件、媒体资源),没有可审查的代码逻辑,已跳过 AI 代码审查。


- ❌ PR 未关联里程碑或 Issue
请修正后重新提交,或联系仓库管理员。


Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
PR Approval Progress
⚠️ This PR does not yet meet the following requirements:lgtm (requires ≥ 2 person(s) per module)、approve (requires ≥ 1 person(s) per module)
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-Ascend/faiss | ❌ (0/2)(You can also ask: 翁旭涛, 蒋立, 朱伯扬, 马千里, 唐灿辉) | ❌ (0/1)(You can also ask: 向杰, 于金正, 蒋立, 易浩, 王永俊) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Guide
@cftang9999 , thanks for your pull request.
The following commit(s) have not signed Contributor License Agreement (CLA).
| Commit | Reason |
|---|---|
| cf538ed2 添加 CANN 环境变量初始��... | the email is not signed for CLA! please check if it is correct and the same as your signed email. |
If you need to sign CLA, you can click here to sign the CLA.
If you need to check if the email is set up correctly, you can click here to do it in the FAQs.
After signing the CLA or updating the email, you must comment /check-cla to check the CLA status again.


| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | PR-build-SAST-check | ✅ | >>> |
| Build_arm | ✅ | >>> | |
| 恶意代码检查 | Antipoison | ✅ | >>> |
| 编码安全与规范检查 | pre-commit | ✅ | >>> |
| 开源片段检查 | SCA | ✅ | >>> |
| 开发者测试 | PreSmoke | ✅ | >>> |
| 流水线 | PR-pipeline_faiss | ✅ | >>> |
- compile : 运行流水线
- retry : 重试流水线所有失败子任务
- retry <任务名> : 仅重试指定失败子任务
- stop : 停止流水线


自动代码检视通过。
变更内容:
01_quick_start.md:用例测试步骤新增source /usr/local/Ascend/ascend-toolkit/set_env.sh,补充环境变量初始化,修复用户按文档操作时因未 source 环境导致的命令不可用问题。02_installation_guide.md:将编译步骤拆分为选项A(全量编译ops_build.sh)和选项B(仅部署ops_deploy.sh),补充说明ops_deploy.sh已包含ops_build.sh并通过 .run 包部署到 OPP 目录。
纯文档变更,未发现安全或功能问题。文档完整性提升。


/check-cla


CLA检查已通过,详情可参考这里


/check-cla


compile


| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | PR-build-SAST-check | ✅ COMPLETED | >>> |
| Build_arm | ❌ FAILED | >>> | |
| 恶意代码检查 | Antipoison | ✅ COMPLETED | >>> |
| 编码安全与规范检查 | pre-commit | ✅ COMPLETED | >>> |
| 开源片段检查 | SCA | ✅ COMPLETED | >>> |
| 开发者测试 | PreSmoke | ⚪ IGNORED | >>> |
| UT | ❌ FAILED | >>> | |
| 流水线 | PR-pipeline_faiss | ❌ FAILED | >>> |
- compile : 运行流水线
- retry : 重试流水线所有失败子任务
- retry <任务名> : 仅重试指定失败子任务
- stop : 停止流水线


CLA检查未通过,详情可参考这里


/check_cla


retry


| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | PR-build-SAST-check | ✅ COMPLETED | >>> |
| Build_arm | ❌ FAILED | >>> | |
| 恶意代码检查 | Antipoison | ✅ COMPLETED | >>> |
| 编码安全与规范检查 | pre-commit | ✅ COMPLETED | >>> |
| 开源片段检查 | SCA | ✅ COMPLETED | >>> |
| 开发者测试 | PreSmoke | ⚪ IGNORED | >>> |
| UT | ❌ FAILED | >>> | |
| 流水线 | PR-pipeline_faiss | ❌ FAILED | >>> |
- compile : 运行流水线
- retry : 重试流水线所有失败子任务
- retry <任务名> : 仅重试指定失败子任务
- stop : 停止流水线


compile


| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | PR-build-SAST-check | ✅ COMPLETED | >>> |
| Build_arm | ❌ FAILED | >>> | |
| 恶意代码检查 | Antipoison | ✅ COMPLETED | >>> |
| 编码安全与规范检查 | pre-commit | ✅ COMPLETED | >>> |
| 开源片段检查 | SCA | ✅ COMPLETED | >>> |
| 开发者测试 | PreSmoke | ⚪ IGNORED | >>> |
| UT | ❌ FAILED | >>> | |
| 流水线 | PR-pipeline_faiss | ❌ FAILED | >>> |
- compile : 运行流水线
- retry : 重试流水线所有失败子任务
- retry <任务名> : 仅重试指定失败子任务
- stop : 停止流水线


/check_cla


问题/功能描述
Fixes #35
3 cmake最低版本要求不一致,但不在docs目录下,所以未提交
修改方案描述
1
git log
commit 67be8217dbbe3da722e3976927677bb980a822c2 (HEAD -> main, origin/main, origin/HEAD)
Author: cftang9999 cftang9999@163.com
Date: Sun Aug 30 14:14:36 2026 +0000
2
commit 74a804994df65d196de5cad933e7495e031ef402
Author: cftang9999 cftang9999@163.com
Date: Sun Aug 30 13:46:16 2026 +0000
3
cmake_minimum_required版本要求有3.14/3.16/3.17/3.24.0
grep -r cmake_minimum_required
CMakeLists.txt:cmake_minimum_required(VERSION 3.24.0 FATAL_ERROR)
c_api/CMakeLists.txt:cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
demos/rocksdb_ivf/CMakeLists.txt:cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
faiss/npu/ops/CMakeLists.txt:cmake_minimum_required(VERSION 3.16)
faiss/npu/ops/op_impl/ascendc_dist_int8_flat_cos/test/CMakeLists.txt:cmake_minimum_required(VERSION 3.14)
faiss/npu/ops/op_impl/ascendc_dist_int8_flat_l2/test/CMakeLists.txt:cmake_minimum_required(VERSION 3.14)
faiss/npu/ops/op_impl/ascendc_ivfpq_coarse_assign/test/CMakeLists.txt:cmake_minimum_required(VERSION 3.14)
faiss/npu/ops/op_impl/ascendc_ivfpq_residual_encode/test/CMakeLists.txt:cmake_minimum_required(VERSION 3.16)
faiss/npu/ops/op_impl/ascendc_ivfpq_search_distance_ip/test/CMakeLists.txt:cmake_minimum_required(VERSION 3.14)
faiss/npu/ops/op_impl/ascendc_ivfpq_subspace_distance/test/CMakeLists.txt:cmake_minimum_required(VERSION 3.14)
faiss/npu/ops/op_impl/distance_flat_extrema_at_fp32/test/CMakeLists.txt:cmake_minimum_required(VERSION 3.14)
faiss/npu/ops/op_impl/distance_flat_ip/test/CMakeLists.txt:cmake_minimum_required(VERSION 3.14)
faiss/npu/ops/op_impl/distance_flat_l2/test/CMakeLists.txt:cmake_minimum_required(VERSION 3.14)
faiss/npu/ops/op_impl/float_to_half/test/CMakeLists.txt:cmake_minimum_required(VERSION 3.10)
faiss/npu/ops/op_impl/topk_flat_cpu/test/CMakeLists.txt:cmake_minimum_required(VERSION 3.14)
faiss/npu/ops/op_impl/topk_flat_fp32_cpu/test/CMakeLists.txt:cmake_minimum_required(VERSION 3.14)
faiss/npu/ops/op_impl/topk_ivfpq_l3_cpu/test/CMakeLists.txt:cmake_minimum_required(VERSION 3.14)
faiss/python/CMakeLists.txt:cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
开发自检