This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add an option to use a job pool for GPU tests
ClosedPublic

Authored by jhuber6 on Jun 16 2023, 10:44 AM.

Details

Summary

Currently the GPU has restrictions on how many tests can be run in
parallel due to resource constraints. However, building these tests can
take a long time so we want to be able to build them in parallel. This
patch introduces the option LIBC_GPU_TEST_JOBS which is set to the
number of threads to run in parallel.

Diff Detail

Event Timeline

jhuber6 created this revision.Jun 16 2023, 10:44 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 16 2023, 10:44 AM
jhuber6 requested review of this revision.Jun 16 2023, 10:44 AM
tra accepted this revision.Jun 16 2023, 11:21 AM

LGTM.

Just a FYI -- in the past, running too many tests in parallel caused some tests to hang. I've empirically settled on - j4 on cuda bots. Things may have improved in recent CUDA and driver versions, but I didn't push parallel tests further.

This revision is now accepted and ready to land.Jun 16 2023, 11:21 AM

LGTM.

Just a FYI -- in the past, running too many tests in parallel caused some tests to hang. I've empirically settled on - j4 on cuda bots. Things may have improved in recent CUDA and driver versions, but I didn't push parallel tests further.

I've only had CUDA hang on me once in about 500 runs of the test suite due to parallelism, the AMD however stack fails about every other run. This should hopefully allow us to build in parallel, ever since I enabled the string conversion functions the test times have become more unreasonable. It may be worse on AMDGPU specifically because we run LTO on everything, but the strtof test alone takes about 44 seconds to build and run on my machine.

jplehr added a comment.EditedJun 16 2023, 11:52 AM

FWICT this look good to me.
Do I see that right that in the AMDGPU buildbot, we want to set LIBC_GPU_TEST_JOBS=1?

This revision was automatically updated to reflect the committed changes.