Skip to content

[DEV] Support TRITON_INTERPRET=1 #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 11, 2025
Merged

Conversation

mark14wu
Copy link
Collaborator

@mark14wu mark14wu commented Jun 9, 2025

[FIX] Trace now supports InterpretedFunction:

  • class Trace constructor now accepts either JITFunction or InterpretedFunction (re-using the latter or wrapping the former)
  • The trace() decorator wraps both types on first use, and the error message lists all accepted kernel types.

@mark14wu mark14wu requested a review from Copilot June 9, 2025 21:37
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the Trace functionality by adding support for InterpretedFunction kernels. In addition to allowing InterpretedFunction in the Trace constructor, the decorator has been updated to wrap both JITFunction and InterpretedFunction and provide a clearer error message.

  • Updated Trace.init to accept either JITFunction or InterpretedFunction.
  • Modified the decorator to support both kernel types and adjusted error messaging.
Comments suppressed due to low confidence (1)

triton_viz/core/trace.py:37

  • The constructor's type hint still restricts kernel to JITFunction even though the implementation now supports InterpretedFunction. Consider updating the signature to accept Union[JITFunction, InterpretedFunction] for clarity and consistency.
def __init__(self, kernel: JITFunction, client: Union[str, Client]) -> None:

@mark14wu
Copy link
Collaborator Author

mark14wu commented Jun 9, 2025

triton_viz/core/trace.py:37

  • The constructor's type hint still restricts kernel to JITFunction even though the implementation now supports InterpretedFunction. Consider updating the signature to accept Union[JITFunction, InterpretedFunction] for clarity and consistency.
def __init__(self, kernel: JITFunction, client: Union[str, Client]) -> None:

Thanks. Now fixed.

@mark14wu mark14wu merged commit 57b4f02 into keren/v2.0 Jun 11, 2025
1 check passed
@mark14wu mark14wu deleted the fix_triton_interpret branch June 11, 2025 21:56
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