Skip to content

[CRL] Avoid sticky device error state on host buffer registration - #528

Merged
MC952-arch merged 3 commits into
flagos-ai:mainfrom
leoda1:sg
Aug 5, 2026
Merged

[CRL] Avoid sticky device error state on host buffer registration#528
MC952-arch merged 3 commits into
flagos-ai:mainfrom
leoda1:sg

Conversation

@leoda1

@leoda1 leoda1 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

PR Category

CRL (Communication Runtime Layer)

PR Types

Bug Fixes

PR Description

Registering a host buffer went through detectPtrTypeAndMaybeCacheIpc, whose probing IPC call leaves a sticky error in the device runtime. On chips whose runtime cannot clear that state, all later device calls fail.

  • Add getLastError to the device adaptor (implemented for CUDA) to clear the sticky error after the IPC probe.
  • Add flagcxP2pEngineRegEx / flagcxP2pRpcRegisterHost, which take an explicit pointer-type hint so host registration skips the IPC probe entirely and never produces the error.
  • Expose flagcxP2pRegisterHost in the interservice Python wrapper, and let it also locate libflagcx.so under $FLAGCX_PATH/build/lib.

@leoda1 leoda1 changed the title supoort reset cuda error state [CRL] Avoid sticky device error state on host buffer registration Aug 4, 2026
Comment thread flagcx/adaptor/include/flagcx_device_adaptor.h

@MC952-arch MC952-arch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MC952-arch
MC952-arch merged commit 032ffb6 into flagos-ai:main Aug 5, 2026
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants