Skip to content

Conversation

@guan404ming
Copy link
Member

@guan404ming guan404ming commented Nov 18, 2025

Related Issue

closes #18344

Why

When a T.macro containing a block was called multiple times in a TIR function, all expanded blocks had the same name, causing a "Duplicated block name" error in meta_schedule.

How

Implemented automatic block name suffixing during macro expansion

@guan404ming guan404ming force-pushed the fix-duplicated-block-name branch 2 times, most recently from b965f14 to f58e4b1 Compare November 18, 2025 16:07
@guan404ming guan404ming force-pushed the fix-duplicated-block-name branch from 360744c to 8f0202d Compare November 19, 2025 04:12
@guan404ming guan404ming marked this pull request as ready for review November 19, 2025 05:30
@guan404ming
Copy link
Member Author

@tlopex @mshr-h

Copy link
Member

@tlopex tlopex left a comment

Choose a reason for hiding this comment

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

LGTM

@tlopex tlopex merged commit ced7181 into apache:main Nov 25, 2025
16 checks passed
@guan404ming
Copy link
Member Author

Nice, thanks

@guan404ming guan404ming deleted the fix-duplicated-block-name branch November 25, 2025 06:35
@mshr-h
Copy link
Contributor

mshr-h commented Nov 25, 2025

Would be better to include test.

abeeha123 pushed a commit to NextKore/tvm that referenced this pull request Nov 25, 2025
…8465)

## Related Issue

closes apache#18344

## Why

When a `T.macro` containing a block was called multiple times in a TIR
function, all expanded blocks had the same name, causing a "Duplicated
block name" error in meta_schedule.

## How

Implemented automatic block name suffixing during macro expansion
@guan404ming
Copy link
Member Author

Sure, I will follow up with tests. Thanks for your suggestion!

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.

[Bug] "Duplicated block name" when invoking tune_tir with tvm.script.tir.Macro

3 participants