[盗火者计划] 任务5 - JYH#38
Open
JYH1878 wants to merge 4 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
任务概述
任务五:基于稀疏打包的 bootstrapping 算子优化
本 PR 在 lattisense C++ SDK 层暴露 lattigo 底层新增的 bootstrapping 参数预设 API,使上层框架和编译器可以按需选择 Sparse/Dense bootstrapping 参数。同时提供完整的 benchmark 文档和复现指南。
关联 PR
本 PR 依赖 lattigo 子模块的修改,见:cipherflow-fhe/lattigo#13
主要改动
1. C++ SDK 新增参数预设接口
fhe_ops_lib/fhe_lib_v2.hCkksBtpParameter::create_parameter_by_preset(int preset_id)声明fhe_ops_lib/fhe_lib_v2.cppCreateCkksBtpParameterByPreset使用方式:
2. 子模块更新
fhe_ops_lib/lattigo更新至包含 preset API 和 benchmark 测试的最新 commitfhe_ops_lib/lattigo/go_sdk/liblattigo_sanitized.h同步新增CreateCkksBtpParameterByPreset声明3. 文档
README_task5.md:完整的技术文档、实验数据、复现命令、改动清单编译验证
cmake -B build cmake --build build -j$(nproc)✅ C++ 项目全量编译通过(fhe_ops_lib / cxx_sdk_v2 / mega_ag_runners / unittests)
Go SDK 编译验证
cd fhe_ops_lib/lattigo/go_sdk bash build.sh✅
liblattigo.a/liblattigo.so/liblattigo.h全部更新成功核心实验数据(引自 README_task5.md)
Sparse vs Dense Bootstrapping(LogN=16)
结论:Sparse SSE 相比 Dense 实现 2.85× 加速,并节省 4 个模数层级(可留给上层业务计算)。
复现方式
详见
README_task5.md,关键命令: