From 5c6d35482e7cb3d22f9ab8cef37fa16c05a24644 Mon Sep 17 00:00:00 2001 From: Alex Baden Date: Wed, 30 Oct 2024 18:16:35 +0000 Subject: [PATCH] [Inductor] Support Triton AttrsDescriptor cls field (#139193) Fixes #139179 Adding corresponding changes to https://github.com/triton-lang/triton/pull/4888 Pull Request resolved: https://github.com/pytorch/pytorch/pull/139193 Approved by: https://github.com/bertmaher --- torch/_inductor/runtime/hints.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/torch/_inductor/runtime/hints.py b/torch/_inductor/runtime/hints.py index 0a52cf492a0ed..30747c79e9ae1 100644 --- a/torch/_inductor/runtime/hints.py +++ b/torch/_inductor/runtime/hints.py @@ -52,7 +52,9 @@ def AttrsDescriptorWrapper( } # Instantiate AttrsDescriptor with the prepared arguments - res = AttrsDescriptor.from_dict(kwargs) + res = AttrsDescriptor.from_dict( + {"arg_properties": kwargs, "cls": AttrsDescriptor.__name__} + ) assert res.property_values["tt.divisibility"] == 16 assert res.property_values["tt.equal_to"] == 1 return res