Skip to content

Conversation

@starrryz
Copy link
Collaborator

@starrryz starrryz commented Feb 6, 2026

Summary
This PR migrates the HintManager architecture to the v3.3.x branch. It decouples backend logic from the core compiler, enabling cleaner support for AIPU and Ascend backends without polluting the main codebase.

Key Changes
Architecture: Introduced HintManager and BaseHintHandler to manage backend-specific logic via a standardized hook mechanism.

Decoupling: Refactored CodeGenerator.py and jit.py by replacing hardcoded if backend == ... checks with generic hint_trigger calls.

AIPU Support: Added AipuHintHandler to handle backend-specific logic (e.g., tl.load hints), separating invocation logic from core infrastructure changes.

Optimization: Implemented lazy loading for handlers to avoid circular imports and standardized source code comment parsing.

@starrryz starrryz requested a review from zhzhcookie as a code owner February 6, 2026 08:15
Copy link
Collaborator

@sgjzfzzf sgjzfzzf left a comment

Choose a reason for hiding this comment

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

Codes look good to me. Please let others also take a look.

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.

3 participants