Skip to content

Commit 6e85c75

Browse files
Peiying Huameta-codesync[bot]
authored andcommitted
Fix attributes dependency problem
Summary: Fixed the attributes dependency problem so the requested attributes are all correctly displayed. Reviewed By: FindHao Differential Revision: D96211770 fbshipit-source-id: 84a20600a8339a21552fccb6ae11f5a7849eee48
1 parent 7992c90 commit 6e85c75

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

tritonparse/parse/ir_analysis.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,17 @@ def _get_dot_shape() -> dict[str, Any]:
316316
# Ensure dependencies are resolved first
317317
compute_from = attr.get("compute_from", [])
318318
for dep_key in compute_from:
319-
if dep_key not in metadata and dep_key in attr_by_key:
320-
dep_attr = attr_by_key[dep_key]
321-
_extract_single_attr(dep_attr, ir_content, metadata, _get_dot_shape)
319+
if dep_key not in metadata:
320+
if dep_key in attr_by_key:
321+
# Dependency is a declared display attribute - extract it
322+
dep_attr = attr_by_key[dep_key]
323+
_extract_single_attr(dep_attr, ir_content, metadata, _get_dot_shape)
324+
else:
325+
# Dependency is not a declared attribute - try dot_shape cache
326+
# (e.g. input_dtype needed for tile_size_bits computation)
327+
dot_shape = _get_dot_shape()
328+
if dep_key in dot_shape:
329+
metadata[dep_key] = dot_shape[dep_key]
322330

323331
value = _run_compute_rule(compute_rule, metadata, ir_content)
324332
if value is not None:

0 commit comments

Comments
 (0)