Skip to content

[Bugfix][Conductor] Fix stale npu member access in the pybind client - #4610

Merged
Aionw merged 1 commit into
kvcache-ai:mainfrom
he-yufeng:fix/conductor-pybind-device-member
Oct 13, 2026
Merged

Aionw merged 1 commit into
kvcache-ai:mainfrom
he-yufeng:fix/conductor-pybind-device-member

Conversation

@he-yufeng

@he-yufeng he-yufeng commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Description

#4588 renamed the cache tier member of CacheHitResult and RankCacheHitResult from npu to device but missed mooncake-integration/conductor/conductor_py.cpp. The _conductor pybind module no longer compiles, so CTest unit tests (Python 3.12) and CI Gate are red on main (run 38247341261) and on every PR that has picked up 8c9af6c.

conductor_py.cpp:25:26: error: '... RankCacheHitResult' has no member named 'npu'
conductor_py.cpp:32:23: error: '... CacheHitResult' has no member named 'npu'

Point the two dict exports at the renamed member. The exported dict keys (device, cpu_local, cpu_share, disk) are unchanged, so Python consumers see no difference.

I swept for other stale reads of the old member name: the only remaining .npu accesses are in wire_types_test.cpp, where they belong to the intentional PreviousHit wire-compat fixture, not the production structs.

Module

  • Transfer Engine (mooncake-transfer-engine)
  • Mooncake Store (mooncake-store)
  • Mooncake Conductor (mooncake-conductor)
  • Reshard (mooncake-reshard)
  • Mooncake EP (mooncake-ep)
  • Mooncake PG (mooncake-pg)
  • Integration (mooncake-integration)
  • P2P Store (mooncake-p2p-store)
  • Python Wheel (mooncake-wheel)
  • Common (mooncake-common)
  • Mooncake RL (mooncake-rl)
  • CI/CD
  • Docs
  • Other

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Breaking change
  • Documentation update
  • Performance improvement
  • Other

How Has This Been Tested?

Test commands:

c++ -std=c++20 -fsyntax-only \
  -I mooncake-conductor/include -I <yalantinglibs>/include \
  -I <pybind11>/include $(python3-config --includes) \
  mooncake-integration/conductor/conductor_py.cpp

Test results:

  • Pre-fix source: fails with the same two "no member named 'npu'" errors as the red CI run (negative control).
  • Fixed source: clean.
  • Full build and CTest not run locally (no Linux toolchain on this box); CI on this PR covers them.
  • code_format.sh / pre-commit not run: the diff is a two-token identifier rename with no layout change.

Checklist

  • I have performed a self-review of my own code
  • I have formatted my code using ./scripts/code_format.sh
  • I have run pre-commit on the files changed in this PR and all hooks pass
  • I have updated the documentation (if applicable)
  • I have added tests to prove my changes are effective
  • For changes >500 LOC: I have filed an RFC issue

Existing CI already exercises this file; the break was a compile error, not a behavior change, so no new test is added. Formatting and pre-commit boxes left unchecked per the note above.

AI Assistance Disclosure

  • No AI tools were used
  • AI tools were used (specify below)

Kimi Code found the break, prepared the fix, and ran the local verification described above. I reviewed the final diff end-to-end.

kvcache-ai#4588 renamed the cache tier member of CacheHitResult and
RankCacheHitResult from npu to device but did not touch
conductor_py.cpp, so the _conductor module stopped compiling and
every CI run on main now fails at
mooncake-integration/conductor/conductor_py.cpp:25.

Point the two dict exports at the renamed member. Verified with a
syntax-only compile of the translation unit: the pre-fix source fails
with the same two "no member named 'npu'" errors seen in CI, the fixed
source is clean.
@he-yufeng

Copy link
Copy Markdown
Collaborator Author

All checks are green now, including the CTest job that is red on main and the wheel builds that compile the conductor module for real. Every PR that picks up 8c9af6c inherits the broken pybind build until this lands, so a merge when a maintainer has a minute would unblock the whole queue. @Misak2333 FYI since this completes the member rename from #4588; @stmatengss @alogfans could one of you take a look?

@Misak2333

Copy link
Copy Markdown
Contributor

CTest job that is red on main and the wheel builds that compile the conductor modul

LGTM. This fix resolves the KV tier name inconsistency introduced by #4469 and #4588, without introducing other bugs.

@Aionw
Aionw merged commit 7c70fdc into kvcache-ai:main Oct 13, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants