This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget][amdgpu] Drop env variables
ClosedPublic

Authored by JonChesterfield on Aug 26 2021, 12:41 PM.

Details

Summary

Use the same debug print as the rest of libomptarget plugins with
the same environment control. Also drop the max queue size debugging hook as
I don't believe it is still in use, can bring it back near the rest of the env
handling in rtl.cpp if someone objects.

That makes most of rt.h and all of utils.cpp unused. Clean that up and simplify
control flow in a couple of places.

Behaviour change is that debug prints that used to use the old environment
variable now use the new one and print in slightly different format, and the
removal of the max queue size variable.

Diff Detail

Event Timeline

JonChesterfield requested review of this revision.Aug 26 2021, 12:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 26 2021, 12:42 PM
openmp/libomptarget/plugins/amdgpu/impl/rt.h
24

This was previously forward declared in rtl.cpp, moving it to a header to catch divergence in prototype vs implementation

openmp/libomptarget/plugins/amdgpu/impl/utils.cpp
31

Potentially contentious point is here. Previously we let stoi(ATMI_MAX_HSA_QUEUE_SIZE) override the maximum size HSA queue created. This patch leaves the 4096 limit in place (which seems low to me) but removes the environment control.

We might want a whole suite of environment variables for overriding things like queue size, but I don't see anything particularly special about this one. Suggest we drop it and if someone objects reinstate it (in rtl.cpp, near the other environment uses)

  • ensure debug.h has the DEBUG_PREFIX macro defined before including

I like that the plugin shrinks. No objections here.

This revision is now accepted and ready to land.Sep 1 2021, 11:34 PM
This revision was landed with ongoing or failed builds.Sep 2 2021, 3:03 AM
This revision was automatically updated to reflect the committed changes.