MemCache是针对AI推理场景设计的高性能分布式KVCache缓存,针对昇腾超节点、服务器的实现了精细化性能调优,提供较好的High Availability能力, 同时对接到vllm-ascend、sglang、mindie等开源推理框架
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
add agents.md and skills Co-authored-by: shilinlee<836160610@qq.com> # message auto-generated for no-merge-commit merge: !331 merge codex/add-agentsmd-contributor-guide into develop add agents.md and skills Created-by: shilinlee_com Commit-by: shilinlee Merged-by: yrewzjsx Description: # 合入来源 - [ ] 需求 - [ ] 问题单 - [x] issue # 问题/功能描述 新增 MemCache 仓库的 Agent/Claude Code 通用开发辅助配置,方便不同 Agent 工具复用同一套项目说明和 skills,辅助代码审查与 release note 生成。 # 修改方案描述 - 新增 AGENTS.md,整理本仓库构建、测试、预提交、代码规范、运行配置、模块边界、文档同步和产物依赖说明。 - 新增 .agents/README.md,说明当前可用 Agent skills、使用方式和免责声明。 - 新增 .agents/skills/memcache-code-review/SKILL.md,用于按本项目已有规范、脚本和文档执行代码审查。 - 新增 .agents/skills/memcache-release/SKILL.md,用于生成 MemCache 变更日志或发布说明,发布说明章节标题使用英文。 - 新增 CLAUDE.md -> AGENTS.md 软链,兼容 Claude Code 默认读取习惯。 - 新增 .claude/skills -> ../.agents/skills 软链,兼容 Claude Code skills 目录习惯。 # 是否涉及UT/ST - [ ] 是 - [x] 否(说明理由) 仅新增 Agent 使用说明、skills 文档和 Claude Code 兼容软链,不涉及源码逻辑变更,不需要新增 UT/ST。已使用 quick_validate.py 校验新增的两个 SKILL.md。 # 开发自检 - [x] 规范:未超过1k;超过1k已完成备案;反合入需要标题注明【反合】 - [x] 规范:已关联issue或里程碑 - [x] 规范:不需要UT/ST且已说明理由;需要且已包含UT/ST - [ ] 安全:涉及对外接口/参数/环境变量改动,并同步修改资料 - [x] 安全:未引入三方开源软件;引入三方开源软件并经过安全评审 - [x] 安全:未新增对外接口/参数;新增对外接口/参数有校验 - [x] 规范:未涉及资料改动;涉及资料改动并已完成修改 See merge request: Ascend/memcache!331 | 2 个月前 | |
Disable kv_events in CMake smoke test to avoid libzmq build failure with CMake 4.x | 2 个月前 | |
| 3 个月前 | ||
feat: support device_uboe for 950 Co-authored-by: shilinlee_com<836160610@qq.com> # message auto-generated for no-merge-commit merge: !338 merge feat-uboe into develop feat: support device_uboe for 950 Created-by: shilinlee_com Commit-by: shilinlee_com Merged-by: yrewzjsx Description: # 合入来源 - [ ] 需求 - [ ] 问题单 - [x] issue # 问题/功能描述 MemCache 需支持新的设备间数据传输协议 device_uboe(UB over Ethernet),以适配 Ascend A5 硬件的 UBoE 通信路径。 memfabric_hybrid 底座已在提交 dc327ca7 中新增 SMEMB_DATA_OP_DEVICE_UBOE = 1U << 7 枚举及对应的 HYBM_DOP_TYPE_DEVICE_UBOE 传输路径支持。MemCache 侧需同步对接,使能用户通过 protocol = "device_uboe" 配置选用该协议。 # 修改方案描述 参照 device_urma(commit d50731c1)的实现模式,新增 device_uboe(UBoE over device)协议支持,与 memfabric_hybrid 底座(dc327ca7)对齐: 1. **C++ 核心**:新增 SMEMB_DATA_OP_DEVICE_UBOE 枚举值及 device_uboe 字符串映射;协议枚举校验和 1GB 对齐逻辑同步覆盖 device_uboe。 2. **UT**:新增 device_uboe 的 1GB 对齐 + 枚举映射测试。 3. **资料**:README、配置文件、C++/Python/配置文档均补充 device_uboe 协议说明。 **验证方式** 远端 Ascend aarch64 容器(openEuler + CANN 9.1.0 + Python 3.11.10),DEBUG 编译后安装 wheel,配置 protocol = "device_uboe"、dram_size = 10GB、hbm_size = 1GB、world_size = 1024,启动 MetaService 后执行 test_mmc_layers_batch.py,2 个用例全部通过(Ran 2 tests ... OK),put/get 数据校验正确。 # 是否涉及UT/ST - [x] 是 - [ ] 否(说明理由) 新增 device_uboe 协议的配置校验(1GB 对齐)和枚举映射 UT,位于 test/ut/testcase/memcache/csrc/config/test_mmc_configuration.cpp。   # 开发自检 - [x] 规范:未超过1k;超过1k已完成备案;反合入需要标题注明【反合】 - [ ] 规范:已关联issue或里程碑 - [x] 规范:不需要UT/ST且已说明理由;需要且已包含UT/ST - [x] 安全:涉及对外接口/参数/环境变量改动,并同步修改资料 - [x] 安全:未引入三方开源软件;引入三方开源软件并经过安全评审 - [x] 安全:未新增对外接口/参数;新增对外接口/参数有校验 - [x] 规范:未涉及资料改动;涉及资料改动并已完成修改 See merge request: Ascend/memcache!338 | 2 个月前 | |
批量Get待全部回温完成后统一修改租约,避免回温占用租约时间 Co-authored-by: mrh1024<marunhua1@h-partners.com> Co-authored-by: gcw_qYJeyWK4<jiangbo97@huawei.com> Co-authored-by: gitcode-bot<noreply@gitcode.com> # message auto-generated for no-merge-commit merge: !340 merge feature/ubsio_adapt into develop 修改ubsio-bio.conf为ubsio.conf;批量Get待全部回温完成后统一修改租约;所有blob删除完成后清理meta Created-by: gcw_qYJeyWK4 Commit-by: gcw_qYJeyWK4;gitcode-bot;mrh1024 Merged-by: yrewzjsx Description: # 合入来源 - [x] 需求 - [ ] 问题单 - [x] issue # 问题/功能描述 # 修改方案描述 # 是否涉及UT/ST - [ ] 是 - [x] 否(说明理由) # 开发自检 - [x] 规范:未超过1k;超过1k已完成备案;反合入需要标题注明【反合】 - [x] 规范:已关联issue或里程碑 - [x] 规范:不需要UT/ST且已说明理由;需要且已包含UT/ST - [x] 安全:涉及对外接口/参数/环境变量改动,并同步修改资料 - [x] 安全:未引入三方开源软件;引入三方开源软件并经过安全评审 - [x] 安全:未新增对外接口/参数;新增对外接口/参数有校验 - [x] 规范:未涉及资料改动;涉及资料改动并已完成修改 See merge request: Ascend/memcache!340 | 2 个月前 | |
feat: support device_uboe for 950 Co-authored-by: shilinlee_com<836160610@qq.com> # message auto-generated for no-merge-commit merge: !338 merge feat-uboe into develop feat: support device_uboe for 950 Created-by: shilinlee_com Commit-by: shilinlee_com Merged-by: yrewzjsx Description: # 合入来源 - [ ] 需求 - [ ] 问题单 - [x] issue # 问题/功能描述 MemCache 需支持新的设备间数据传输协议 device_uboe(UB over Ethernet),以适配 Ascend A5 硬件的 UBoE 通信路径。 memfabric_hybrid 底座已在提交 dc327ca7 中新增 SMEMB_DATA_OP_DEVICE_UBOE = 1U << 7 枚举及对应的 HYBM_DOP_TYPE_DEVICE_UBOE 传输路径支持。MemCache 侧需同步对接,使能用户通过 protocol = "device_uboe" 配置选用该协议。 # 修改方案描述 参照 device_urma(commit d50731c1)的实现模式,新增 device_uboe(UBoE over device)协议支持,与 memfabric_hybrid 底座(dc327ca7)对齐: 1. **C++ 核心**:新增 SMEMB_DATA_OP_DEVICE_UBOE 枚举值及 device_uboe 字符串映射;协议枚举校验和 1GB 对齐逻辑同步覆盖 device_uboe。 2. **UT**:新增 device_uboe 的 1GB 对齐 + 枚举映射测试。 3. **资料**:README、配置文件、C++/Python/配置文档均补充 device_uboe 协议说明。 **验证方式** 远端 Ascend aarch64 容器(openEuler + CANN 9.1.0 + Python 3.11.10),DEBUG 编译后安装 wheel,配置 protocol = "device_uboe"、dram_size = 10GB、hbm_size = 1GB、world_size = 1024,启动 MetaService 后执行 test_mmc_layers_batch.py,2 个用例全部通过(Ran 2 tests ... OK),put/get 数据校验正确。 # 是否涉及UT/ST - [x] 是 - [ ] 否(说明理由) 新增 device_uboe 协议的配置校验(1GB 对齐)和枚举映射 UT,位于 test/ut/testcase/memcache/csrc/config/test_mmc_configuration.cpp。   # 开发自检 - [x] 规范:未超过1k;超过1k已完成备案;反合入需要标题注明【反合】 - [ ] 规范:已关联issue或里程碑 - [x] 规范:不需要UT/ST且已说明理由;需要且已包含UT/ST - [x] 安全:涉及对外接口/参数/环境变量改动,并同步修改资料 - [x] 安全:未引入三方开源软件;引入三方开源软件并经过安全评审 - [x] 安全:未新增对外接口/参数;新增对外接口/参数有校验 - [x] 规范:未涉及资料改动;涉及资料改动并已完成修改 See merge request: Ascend/memcache!338 | 2 个月前 | |
Add devcontainer configuration and remote-dev quickstart guide Dev container tooling (.devcontainer/): - Dockerfile: based on vllm-ascend image with doxygen, graphviz, and debug tools (gdb, valgrind, strace, ltrace, cgdb) - devcontainer.json: VS Code Remote-SSH + Dev Container configuration with NPU driver mounts, pip/ccache volumes, and RUN_BENCH support - post_create.sh: bootstrap script installing Python dependencies, initialising git submodules, verifying toolchain, CMake smoke test - requirements.txt: Python development dependencies including pybind11, memfabric_hybrid, pre-commit, pytest Documentation: - doc/devcontainer_quickstart.md: guide for VS Code Remote-SSH + Dev Container setup with Ascend NPU environment, covering cloning, image building, and running all examples - README.md: add link to devcontainer quickstart under 快速入门 | 2 个月前 | |
add grafana json template Co-authored-by: xiangzhong007<xiangzhong1@huawei.com> # message auto-generated for no-merge-commit merge: !328 merge add_graph_json into develop add grafana json template Created-by: xiangzhong007 Commit-by: xiangzhong007 Merged-by: chenyz6 Description: # 合入来源 - [ ] 需求 - [ ] 问题单 - [x] issue # 问题/功能描述 需要通过prometheus+grafana展示vllm的数据,上传json模板 # 修改方案描述 # 是否涉及UT/ST - [ ] 是 - [x] 否(说明理由) # 开发自检 - [ ] 规范:未超过1k;超过1k已完成备案;反合入需要标题注明【反合】 - [ ] 规范:已关联issue或里程碑 - [ ] 规范:不需要UT/ST且已说明理由;需要且已包含UT/ST - [ ] 安全:涉及对外接口/参数/环境变量改动,并同步修改资料 - [ ] 安全:未引入三方开源软件;引入三方开源软件并经过安全评审 - [ ] 安全:未新增对外接口/参数;新增对外接口/参数有校验 - [ ] 规范:未涉及资料改动;涉及资料改动并已完成修改 See merge request: Ascend/memcache!328 | 2 个月前 | |
ci: add pre-commit script Co-authored-by: shilinlee<836160610@qq.com> # message auto-generated for no-merge-commit merge: !216 merge pre-commit into develop ci: add pre-commit script Created-by: shilinlee_com Commit-by: shilinlee Merged-by: yrewzjsx Description: # Pull Request Template ## Description <!-- Provide a clear summary of the change, the problem it solves, and the technical approach. --> ## Related Issues <!-- Replace with actual issue numbers. Example: Closes #123, Related to #456 --> ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Performance optimization - [ ] Documentation update - [ ] Other (please describe):_______________ ## Testing <!-- Describe how the changes were tested. Include: - Unit/integration test coverage - Manual validation steps - Links to CI reports (e.g., CIDA) if available - Note any pending tests --> ## Checklist - [ ] I have performed a self-review of my own code. - [ ] I have updated the documentation. - [ ] I have added tests to prove my changes are effective. See merge request: Ascend/memcache!216 | 4 个月前 | |
Remove ci_devcontainer_check.sh (moved to pr-run-all-examples branch) | 2 个月前 | |
批量Get待全部回温完成后统一修改租约,避免回温占用租约时间 Co-authored-by: mrh1024<marunhua1@h-partners.com> Co-authored-by: gcw_qYJeyWK4<jiangbo97@huawei.com> Co-authored-by: gitcode-bot<noreply@gitcode.com> # message auto-generated for no-merge-commit merge: !340 merge feature/ubsio_adapt into develop 修改ubsio-bio.conf为ubsio.conf;批量Get待全部回温完成后统一修改租约;所有blob删除完成后清理meta Created-by: gcw_qYJeyWK4 Commit-by: gcw_qYJeyWK4;gitcode-bot;mrh1024 Merged-by: yrewzjsx Description: # 合入来源 - [x] 需求 - [ ] 问题单 - [x] issue # 问题/功能描述 # 修改方案描述 # 是否涉及UT/ST - [ ] 是 - [x] 否(说明理由) # 开发自检 - [x] 规范:未超过1k;超过1k已完成备案;反合入需要标题注明【反合】 - [x] 规范:已关联issue或里程碑 - [x] 规范:不需要UT/ST且已说明理由;需要且已包含UT/ST - [x] 安全:涉及对外接口/参数/环境变量改动,并同步修改资料 - [x] 安全:未引入三方开源软件;引入三方开源软件并经过安全评审 - [x] 安全:未新增对外接口/参数;新增对外接口/参数有校验 - [x] 规范:未涉及资料改动;涉及资料改动并已完成修改 See merge request: Ascend/memcache!340 | 2 个月前 | |
新增主动增加和释放租约接口 Co-authored-by: Oranbean258<tanghongcheng1@h-partners.com> # message auto-generated for no-merge-commit merge: !333 merge 0701fix into develop 新增主动增加和释放租约接口 Created-by: thc72549 Commit-by: t30062639;Oranbean258 Merged-by: yrewzjsx Description: # 合入来源 - [ ] 需求 - [ ] 问题单 - [x] issue # 问题/功能描述 vllm_ascend layerwise场景下,查询和数据拷贝分别在scheduler进程和worker进程,导致现有的租约设计中无法保证worker进程的拷贝参数有效,需要提供显式主动增加和释放对应Key租约的手段 # 修改方案描述 把原来通过 query/batch_query 的 flag 隐式触发读租约,改成显式的 batch_add_lease / batch_remove_lease 生命周期管理。 新的典型流程变为: 写进程:batch_malloc 分配 GVA -> 写入数据 -> batch_copy 写完成并通知可读。 读进程:batch_get_key_info 获取 GVA 信息 -> batch_add_lease 增加/续约读租约 -> batch_copy 读取数据 -> batch_remove_lease 显式释放租约。 同时,batch_copy 读路径不再在读完后自动发送 READ_FINISH,只负责检查可读、检查租约有效、执行拷贝、再次确认租约未过期并返回。租约释放改由用户显式调用 batch_remove_lease,该接口异步发送 READ_FINISH,返回任务提交结果。 # 是否涉及UT/ST - [x] 是 - [ ] 否(说明理由) # 开发自检 - [x] 规范:未超过1k;超过1k已完成备案;反合入需要标题注明【反合】 - [x] 规范:已关联issue或里程碑 - [x] 规范:不需要UT/ST且已说明理由;需要且已包含UT/ST - [x] 安全:涉及对外接口/参数/环境变量改动,并同步修改资料 - [x] 安全:未引入三方开源软件;引入三方开源软件并经过安全评审 - [x] 安全:未新增对外接口/参数;新增对外接口/参数有校验 - [x] 规范:未涉及资料改动;涉及资料改动并已完成修改 See merge request: Ascend/memcache!333 | 2 个月前 | |
!824 【A2】GVM 支持 Device RDMA | 11 个月前 | |
大幅度提高本地ut脚本速度(几分钟到几秒) Co-authored-by: j00808874<jiangchanghong3@huawei.com> # message auto-generated for no-merge-commit merge: !94 merge mr into develop 大幅度提高本地ut脚本速度(几分钟到几秒) Created-by: j00808874 Commit-by: j00808874 Merged-by: chenyz6 Description: # Pull Request Template ## Description <!-- Provide a clear summary of the change, the problem it solves, and the technical approach. --> ## Related Issues <!-- Replace with actual issue numbers. Example: Closes #123, Related to #456 --> ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Performance optimization - [ ] Documentation update - [ ] Other (please describe):_______________ ## Testing <!-- Describe how the changes were tested. Include: - Unit/integration test coverage - Manual validation steps - Links to CI reports (e.g., CIDA) if available - Note any pending tests --> ## Checklist - [ ] I have performed a self-review of my own code. - [ ] I have updated the documentation. - [ ] I have added tests to prove my changes are effective. See merge request: Ascend/memcache!94 | 7 个月前 | |
该MR主要是适配UBSIO框架调整,支持UBSIO独立管理盘空间容量以及回调处理delete 事件 Co-authored-by: mrh1024<marunhua1@h-partners.com> Co-authored-by: gcw_qYJeyWK4<jiangbo97@huawei.com> Co-authored-by: gitcode-bot<noreply@gitcode.com> # message auto-generated for no-merge-commit merge: !335 merge feature/ubsio_adapt into develop refactor: 优化批量回温以及补充基于rank打点信息(环境变量MMC_ENABLE_PER_RANK_METRICS),补充ExistKey预取(配置项开关 ock.mmc.prefetch.enabled=true),以及适配UBSIO事件处理 Created-by: gcw_qYJeyWK4 Commit-by: gcw_qYJeyWK4;gitcode-bot;mrh1024 Merged-by: yrewzjsx Description: # 合入来源 - [x] 需求 - [ ] 问题单 - [ ] issue # 问题/功能描述 # 修改方案描述 # 是否涉及UT/ST - [x] 是 - [ ] 否(说明理由) # 开发自检 - [x] 规范:未超过1k;超过1k已完成备案;反合入需要标题注明【反合】 - [ ] 规范:已关联issue或里程碑 - [ ] 规范:不需要UT/ST且已说明理由;需要且已包含UT/ST - [ ] 安全:涉及对外接口/参数/环境变量改动,并同步修改资料 - [ ] 安全:未引入三方开源软件;引入三方开源软件并经过安全评审 - [ ] 安全:未新增对外接口/参数;新增对外接口/参数有校验 - [ ] 规范:未涉及资料改动;涉及资料改动并已完成修改 See merge request: Ascend/memcache!335 | 2 个月前 | |
当前修改仅涉及打包脚本,不涉及源码变更,所以没有ut的变更 Co-authored-by: gcw_qYJeyWK4<jiangbo97@huawei.com> # message auto-generated for no-merge-commit merge: !312 merge feature/ubsio-packaging into develop feature:打包带上ubsio Created-by: gcw_qYJeyWK4 Commit-by: gcw_qYJeyWK4 Merged-by: yrewzjsx Description: # Pull Request Template ## Description  ## Related Issues <!-- Replace with actual issue numbers. Example: Closes #123, Related to #456 --> ## Type of Change - [ ] Bug fix - [x] New feature - [ ] Performance optimization - [ ] Documentation update - [ ] Other (please describe):_______________ ## Testing <!-- Describe how the changes were tested. Include: - Unit/integration test coverage - Manual validation steps - Links to CI reports (e.g., CIDA) if available - Note any pending tests --> ## Checklist - [ ] I have performed a self-review of my own code. - [ ] I have updated the documentation. - [ ] I have added tests to prove my changes are effective. See merge request: Ascend/memcache!312 | 2 个月前 | |
ci: add pre-commit script Co-authored-by: shilinlee<836160610@qq.com> # message auto-generated for no-merge-commit merge: !216 merge pre-commit into develop ci: add pre-commit script Created-by: shilinlee_com Commit-by: shilinlee Merged-by: yrewzjsx Description: # Pull Request Template ## Description <!-- Provide a clear summary of the change, the problem it solves, and the technical approach. --> ## Related Issues <!-- Replace with actual issue numbers. Example: Closes #123, Related to #456 --> ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Performance optimization - [ ] Documentation update - [ ] Other (please describe):_______________ ## Testing <!-- Describe how the changes were tested. Include: - Unit/integration test coverage - Manual validation steps - Links to CI reports (e.g., CIDA) if available - Note any pending tests --> ## Checklist - [ ] I have performed a self-review of my own code. - [ ] I have updated the documentation. - [ ] I have added tests to prove my changes are effective. See merge request: Ascend/memcache!216 | 4 个月前 | |
add agents.md and skills Co-authored-by: shilinlee<836160610@qq.com> # message auto-generated for no-merge-commit merge: !331 merge codex/add-agentsmd-contributor-guide into develop add agents.md and skills Created-by: shilinlee_com Commit-by: shilinlee Merged-by: yrewzjsx Description: # 合入来源 - [ ] 需求 - [ ] 问题单 - [x] issue # 问题/功能描述 新增 MemCache 仓库的 Agent/Claude Code 通用开发辅助配置,方便不同 Agent 工具复用同一套项目说明和 skills,辅助代码审查与 release note 生成。 # 修改方案描述 - 新增 AGENTS.md,整理本仓库构建、测试、预提交、代码规范、运行配置、模块边界、文档同步和产物依赖说明。 - 新增 .agents/README.md,说明当前可用 Agent skills、使用方式和免责声明。 - 新增 .agents/skills/memcache-code-review/SKILL.md,用于按本项目已有规范、脚本和文档执行代码审查。 - 新增 .agents/skills/memcache-release/SKILL.md,用于生成 MemCache 变更日志或发布说明,发布说明章节标题使用英文。 - 新增 CLAUDE.md -> AGENTS.md 软链,兼容 Claude Code 默认读取习惯。 - 新增 .claude/skills -> ../.agents/skills 软链,兼容 Claude Code skills 目录习惯。 # 是否涉及UT/ST - [ ] 是 - [x] 否(说明理由) 仅新增 Agent 使用说明、skills 文档和 Claude Code 兼容软链,不涉及源码逻辑变更,不需要新增 UT/ST。已使用 quick_validate.py 校验新增的两个 SKILL.md。 # 开发自检 - [x] 规范:未超过1k;超过1k已完成备案;反合入需要标题注明【反合】 - [x] 规范:已关联issue或里程碑 - [x] 规范:不需要UT/ST且已说明理由;需要且已包含UT/ST - [ ] 安全:涉及对外接口/参数/环境变量改动,并同步修改资料 - [x] 安全:未引入三方开源软件;引入三方开源软件并经过安全评审 - [x] 安全:未新增对外接口/参数;新增对外接口/参数有校验 - [x] 规范:未涉及资料改动;涉及资料改动并已完成修改 See merge request: Ascend/memcache!331 | 2 个月前 | |
Revert "Set CMAKE_POLICY_VERSION_MINIMUM=3.5 for CMake 4.x compatibility with libzmq" This reverts commit 521d7bf786d181613d09add405cb8accf29dac1e. | 2 个月前 | |
!1113 更新license | 9 个月前 | |
Add devcontainer configuration and remote-dev quickstart guide Dev container tooling (.devcontainer/): - Dockerfile: based on vllm-ascend image with doxygen, graphviz, and debug tools (gdb, valgrind, strace, ltrace, cgdb) - devcontainer.json: VS Code Remote-SSH + Dev Container configuration with NPU driver mounts, pip/ccache volumes, and RUN_BENCH support - post_create.sh: bootstrap script installing Python dependencies, initialising git submodules, verifying toolchain, CMake smoke test - requirements.txt: Python development dependencies including pybind11, memfabric_hybrid, pre-commit, pytest Documentation: - doc/devcontainer_quickstart.md: guide for VS Code Remote-SSH + Dev Container setup with Ascend NPU environment, covering cloning, image building, and running all examples - README.md: add link to devcontainer quickstart under 快速入门 | 2 个月前 | |
更新版本号 1.2.0 Co-authored-by: p3rry<penghaiqing1@huawei.com> # message auto-generated for no-merge-commit merge: !259 merge develop_version_0516 into develop 更新版本号 1.2.0 Created-by: p3rry Commit-by: p3rry Merged-by: yrewzjsx Description: # Pull Request Template ## Description <!-- Provide a clear summary of the change, the problem it solves, and the technical approach. --> ## Related Issues <!-- Replace with actual issue numbers. Example: Closes #123, Related to #456 --> ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Performance optimization - [ ] Documentation update - [ ] Other (please describe):_______________ ## Testing <!-- Describe how the changes were tested. Include: - Unit/integration test coverage - Manual validation steps - Links to CI reports (e.g., CIDA) if available - Note any pending tests --> ## Checklist - [ ] I have performed a self-review of my own code. - [ ] I have updated the documentation. - [ ] I have added tests to prove my changes are effective. See merge request: Ascend/memcache!259 | 3 个月前 |
🔄Latest News
-
[2026/06] MemCache使能推理PrefixCache加速案例实践,请关注wiki主页案例库获取最新案例
-
[2025/12] MemCache已作为vllm-ascend backend使能大模型推理加速,详情查看vllm-ascend开源社区,使用示例
-
[2025/11] MemCache项目于2025年11月开源,开源社区地址为:https://gitcode.com/Ascend/memcache
🔜 Roadmap&发布策略
MemCache roadmap详见: Roadmap MemCache 分支发布策略:分支发布策略
🎉概述
MemCache是针对LLM推理、GR推理场景设计的高性能分布式KVCache存储引擎,其主要特性包括:
- 基于对象操作的API:支持批量和非批量的put/get/exist/remove操作,支持多层结构的KV Block读写接口。
- 多层缓存池:支持HBM,DDR,SSD组成多级缓存池,多级之间通过淘汰和预取进行数据冷热交换。
- 高带宽低时延:使用 MemFabric 作为多级内存和异构网络传输的底座,在Ascend硬件上,基于device_rdma(A2)、device_sdma(A3)、host_rdma(A2/A3)、device_urma(A5)、device_uboe(A5) 等路径提供OneCopy跨机跨介质数据直接访问能力,满足高带宽,低时延的读写性能述求。在鲲鹏硬件上,支持host_urma(K5)。支持host_shm实现同节点共享内存通信。
- 支持扩缩容:支持LocalService动态加入和移除
- HA能力:在K8S集群中,MetaService支持多活能力,支持元数据恢复,提供尽力而为的HA能力。
🧩核心组件
MemCache包含LocalService和MetaService两大核心组件:
-
MetaService:
- 负责管理整个集群中内存池空间的分配和管理,处理LocalService的加入与退出。
- MetaService作为独立进程运行,提供两种启动方式:python API启动;二进制启动,详见 whl安装使用 和 run安装使用
- MetaService支持两种部署形态: 1、单点模式:MetaService由单个进程组成,部署方式简单,但存在单点故障的问题。如果MetaService进程崩溃或无法访问,系统将无法继续提供服务,直至重新恢复为止。 2、HA模式:该模式基于K8S的的ClusterIP Service和Lease资源构建,部署较为复杂,该模式会部署多个MetaService进程实例,实现多活高可用。部署详见怎么部署一个MemCache的HA集群
-
LocalService:负责承担如下功能:
- 客户端:作为客户端,以whl/so形式作为共享库被应用进程加载调用API
- 内存提供者:负责提供一段连续的内存区域作为内存池空间的一部分,其内存可以被其他LocalService实例基于地址直接访问。
🔥性能表现
MemCache核心能力是提供大容量内存池和高性能的H2D、D2H、D2RH、RH2D数据访问能力,由于MemCache以 MemFabric 作为池化底座,所以支持RH2D、D2RH等OneCopy跨机跨介质数据直接访问能力,下图为RH2D对比其他中转路径的对比示意图。
基于OneCopy跨机跨介质数据直接访问的能力,MemCache在A2/A3做了相关性能测试如下: 模拟构造DeepSeek-R1模型KV大小的block,单个block size为:61x128K + 61x16K = 8784KB ≈ 8.57MB,共122个离散地址。
- 使用2个昇腾A2节点(每节点8张卡)组成双机内存池进行读写测试性能如下:
- 使用2个昇腾A3节点(每节点8张卡16Die)组成双机内存池进行读写测试性能如下:
🚀快速入门
请访问以下文档获取简易教程。
- 安装使用:whl安装和使用(适用于Python用户),run编译、安装和使用(适用于C++用户)
- 配置文件:涉及MetaService、LocalService公共配置
- 样例执行:介绍如何端到端执行样例代码,包括C++和Python样例
- DevContainer 远端开发:VS Code Remote-SSH + DevContainer 一站式开发环境搭建与全量示例运行指南
📑学习教程
📦软件硬件配套说明
- MemCache软件依赖 MemFabric,相关配套与MemFabric相同
📌FAQ
常见问题请参考:FAQ