This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Introduce separate register limit bias in scheduler
ClosedPublic

Authored by rampitec on Jan 18 2023, 12:09 PM.

Details

Summary

Current implementation abuses ErrorMargin to apply an additional
bias to VGPR and SGPR limits under a high register pressure. The
ErrorMargin exists to account for inaccuracies of the RP tracker
and not to tackle an excess pressure. Introduce separate bias for
this purpose and also make it different for SGPRs and VGPRs as we
may want to use different values in the future.

This is supposed to be NFC, however there is a subtle difference
when subtracting a margin overflows the limit. Doing two subtractions
makes it less probable, although manifests only in mir tests with
an artificially small register budget.

Diff Detail

Event Timeline

rampitec created this revision.Jan 18 2023, 12:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2023, 12:09 PM
rampitec requested review of this revision.Jan 18 2023, 12:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2023, 12:09 PM
Herald added a subscriber: wdng. · View Herald Transcript
kerbowa accepted this revision.Jan 18 2023, 10:25 PM

LGTM, thanks!

This revision is now accepted and ready to land.Jan 18 2023, 10:25 PM