Skip to content

Commit 22e293e

Browse files
committed
Add string representation for AttrsDescriptor (#4888)
The string representation allows PyTorch Inductor to serialize/derserialize the `AttrsDescriptor` to the `@triton.heuristics` block in the generated code.
1 parent 54b3834 commit 22e293e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/triton/backends/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def get_property_key(val, align):
211211
return "N"
212212

213213
def __repr__(self):
214-
return f"AttrsDescriptor.from_dict({self.arg_properties})"
214+
return f"AttrsDescriptor.from_dict({self.to_dict()!r})"
215215

216216

217217
@dataclass(frozen=True)

0 commit comments

Comments
 (0)