Page MenuHomePhabricator

[libomptarget][amdgpu][nfc] Drop dead signal pool setup

Authored by JonChesterfield on Wed, Jul 21, 5:40 PM.



This class is instantiated once in rtl.cpp before hsa_init is
called. The hsa_signal_create call therefore fails leaving the pool empty.

This signal pool is a legacy from ATMI where it was constructed after hsa_init.
Moving the state into the rtl.cpp global class disabled the initial populating
of the pool without noticeably changing performance. Just rechecked with a fix
that allocates the signals after hsa_init and that also doesn't noticeably
change performance.

This patch therefore drops the initialisation. Only change from main is to
drop a DEBUG_PRINT statement that would say the pool initial size is zero.

Diff Detail

Event Timeline

JonChesterfield requested review of this revision.Wed, Jul 21, 5:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptWed, Jul 21, 5:40 PM
JonChesterfield edited the summary of this revision. (Show Details)Wed, Jul 21, 5:41 PM
jdoerfert accepted this revision.Wed, Jul 21, 9:51 PM

LG. If we don't need the pool, maybe remove it?

This revision is now accepted and ready to land.Wed, Jul 21, 9:51 PM

It's a performance thing. I'm not sure signal creation is expensive enough to be worth caching, particularly without a thread local cache, but haven't checked.

They might be cheap to create on gfx9 and expensive on gfx8 or similar. Will need to trace through HSA to see how many operations are avoided by the cache.

This revision was landed with ongoing or failed builds.Thu, Jul 22, 2:29 AM
This revision was automatically updated to reflect the committed changes.