Skip to content

Conversation

@alefimov-amd
Copy link
Contributor

This PR:

  • generalize flags in translate_to_asm function, so now it accepts bool and string flags
  • introduces new case to HIPOptions.schedule_hint which enables iterative-ilp scheduler

@alefimov-amd alefimov-amd changed the title [AMD] Option to use custom scheduler in LLVM backend [WIP] [AMD] Option to use custom scheduler in LLVM backend Sep 30, 2025
@alefimov-amd alefimov-amd force-pushed the iterative-ilp-scheduler-upstream branch from de08064 to cfe234b Compare October 1, 2025 12:32
@alefimov-amd alefimov-amd changed the title [WIP] [AMD] Option to use custom scheduler in LLVM backend [AMD] Option to use custom scheduler in LLVM backend Oct 1, 2025
This PR:

- generalize flags in translate_to_asm function, so now it accepts bool and string flags
- introduces new case to HIPOptions.schedule_hint which enables iterative-ilp scheduler
@binarman binarman force-pushed the iterative-ilp-scheduler-upstream branch from c259e3e to 7c78175 Compare October 28, 2025 22:07
@antiagainst antiagainst marked this pull request as ready for review November 8, 2025 05:50
@antiagainst antiagainst merged commit 78a4129 into triton-lang:main Nov 10, 2025
8 of 9 checks passed
Comment on lines +451 to +455
for hint in options.schedule_hint.split(","):
if hint == 'attention':
flags.append(('sink-insts-to-avoid-spills', True))
if hint == 'memory-bound-attention':
flags.append(('amdgpu-sched-strategy', 'iterative-ilp'))
Copy link
Collaborator

Choose a reason for hiding this comment

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

having llvm dynamic llvm flags will cause multi-threading problems and is going to be a serious problem in real life scenario.
I think we need a different solution here

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah good point; missed that part. Sorry about it. Yeah we can revert this and find a better way--maybe like using some attributes attached to llvm module or something. BTW, the whole schedule hint was meant to be experiemental--more a way to help making trying different LLVM features easier in workloads so we can better work them into LLVM properly.

Copy link
Collaborator

@ThomasRaoux ThomasRaoux Nov 10, 2025

Choose a reason for hiding this comment

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

got it, it's probably fine as experimental but we have to be a bit careful as it breaks in a very subtle way. (usually cause non deterministic cache to be generated)
Attributes would be much better if it is possible

antiagainst added a commit that referenced this pull request Nov 10, 2025
antiagainst added a commit that referenced this pull request Nov 10, 2025
Reverts #8326 given changing
flags makes multi-threading difficult.
antiagainst pushed a commit that referenced this pull request Nov 15, 2025
This is thread safe implementation of #8326.

This PR changed to use function attributes instead of global flags.
It also deletes other existing global flag usage along the way.
tmoreau89 pushed a commit to tmoreau89/triton that referenced this pull request Dec 1, 2025
…on-lang#8326)

This PR:

- generalize flags in translate_to_asm function, so now it accepts bool
and string flags
- introduces new case to HIPOptions.schedule_hint which enables
iterative-ilp scheduler

---------

Co-authored-by: Alexander Efimov <efimov.alexander@gmail.com>
tmoreau89 pushed a commit to tmoreau89/triton that referenced this pull request Dec 1, 2025
tmoreau89 pushed a commit to tmoreau89/triton that referenced this pull request Dec 1, 2025
This is thread safe implementation of triton-lang#8326.

This PR changed to use function attributes instead of global flags.
It also deletes other existing global flag usage along the way.
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.

4 participants