Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions triton_viz/clients/sanitizer/sanitizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,17 @@ def __init__(self, value, symbolic_expr):
def size(self):
return 2

@property
def dtype(self):
"""Return the dtype from the underlying symbolic expression."""
if (
hasattr(self.symbolic_expr, "dtype_tt")
and self.symbolic_expr.dtype_tt is not None
):
return self.symbolic_expr.dtype_tt
# Default to int64 if no dtype is available (common for integer operations)
return np.int64
Copy link
Member

Choose a reason for hiding this comment

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

Please attach the test case, it doesn't seem correct to always fallback to np.int64.

Triton's logic is to assign scalars as int32 or int64 based on their values


def __int__(self):
int_val, _ = self.symbolic_expr.eval()
if isinstance(int_val, IntNumRef):
Expand Down