This is an archive of the discontinued LLVM Phabricator instance.

[Libomptarget] Only build GPU tests if a GPU is found on the system
ClosedPublic

Authored by jhuber6 on Jan 18 2023, 6:58 AM.

Details

Summary
Currently we build tests as long as the libraries are found on the
machine. This doesn't necessarily mean there is a GPU to use though.
This patch changes it to where we only will build the tests if we found
a compatible GPU via `nvptx-arch` or `amdgpu-arch`.

The only downside to this I could see if someone were to build LLVM on a
home node of a cluster and then wished to run the tests after switching
to a compute node. For this I think we should allow it to be overridden.
I think that's better than allowing us to run tests that will fail by
default.

Diff Detail

Event Timeline

jhuber6 created this revision.Jan 18 2023, 6:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2023, 6:58 AM
jhuber6 requested review of this revision.Jan 18 2023, 6:58 AM
This revision is now accepted and ready to land.Jan 18 2023, 8:35 AM

This doesn't tell CI to set LIBOMPTARGET_FORCE_AMDGPU_TESTS, can we do that now so it doesn't get forgotten?

This doesn't tell CI to set LIBOMPTARGET_FORCE_AMDGPU_TESTS, can we do that now so it doesn't get forgotten?

Yes, good point. Where do we store that information? I've never interfaced with the CI.