Skip to content

[DEV] Support TRITON_INTERPRET=1#73

Merged
mark14wu merged 3 commits intokeren/v2.0from
fix_triton_interpret
Jun 11, 2025
Merged

[DEV] Support TRITON_INTERPRET=1#73
mark14wu merged 3 commits intokeren/v2.0from
fix_triton_interpret

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
Contributor

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
@mark14wu mark14wu added this to the CI Fix milestone Jul 1, 2025
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

Comments