Skip to content

Conversation

@lipracer
Copy link
Contributor

TODO:
complete xpubackend registry
add more interface for xpu chips
export some header files

@lipracer lipracer marked this pull request as draft December 16, 2025 09:20
@lipracer lipracer force-pushed the xPUBackend branch 12 times, most recently from 8f7f4a7 to b138d0d Compare December 22, 2025 13:08
@lipracer
Copy link
Contributor Author

Background & Motivation

This PR does not introduce a new concrete backend (e.g. xPU) into StepMesh.

Instead, it refactors the backend layer to support a registration-based backend mechanism, allowing new backends to be added by implementing a well-defined interface and registering it, without requiring invasive modifications to StepMesh core source code.

The primary motivation is to decouple backend extensibility from the core codebase and enable modular experimentation and deployment of new device backends.


What This PR Does

  • Introduces a backend registration mechanism:
    • Backends are discovered and constructed via registration rather than hard-coded integration.
    • Adding a new backend does not require changes to StepMesh core logic.
  • Refines backend-related abstractions to clearly define:
    • The required backend interface contracts
    • Expected default and fallback behaviors
  • Adds a plugin/ directory with a minimal backend example:
    • Intended as a reference implementation only
    • Demonstrates how an external backend can be implemented and registered
    • Not intended to be a production backend

What This PR Does Not Do

  • Does not introduce a new mandatory backend into the system
  • Does not intentionally change existing backend behavior
  • Does not require downstream users to modify existing code unless they opt into the new mechanism

What Feedback I’m Looking For

This is a draft PR shared early for design review. I would especially appreciate feedback on:

  • Whether the registration-based backend design is sound
  • Whether the backend interfaces and contracts are reasonable and future-proof
  • Whether the goal of non-intrusive extensibility is achieved cleanly
  • Any architectural concerns or edge cases that may have been overlooked

While implementation-level feedback is welcome, the primary focus at this stage is on design direction rather than code polish.


Next Steps

Once the overall direction is aligned, the plan is to:

  • Clean up experimental or draft-only parts
  • Improve documentation around backend extension
  • Add or refine tests covering the registration path

@lipracer
Copy link
Contributor Author

@niehao100 This is a draft shared early for design review.
Any feedback on the proposed approach would be appreciated.

@lipracer lipracer force-pushed the xPUBackend branch 2 times, most recently from 9e7e670 to 7c78bb3 Compare December 24, 2025 15:53
TODO:
complete xpubackend registry
add more interface for xpu chips
export some header files

refine

fix

refine

refine
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.

1 participant