This is an archive of the discontinued LLVM Phabricator instance.

[libc] Partially implement 'quick_exit' for the GPU
ClosedPublic

Authored by jhuber6 on Feb 20 2023, 11:47 AM.

Details

Summary

This patch adds a partial implementation of quick_exit for the GPU
target. This is mainly done to test object libraries for the GPU and
will be expanded later. This will simply cause the threads to terminate
on the GPU without returning an error code. This functionality will be
added later to facilitate unit tests.

Diff Detail

Event Timeline

jhuber6 created this revision.Feb 20 2023, 11:47 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 20 2023, 11:47 AM
jhuber6 requested review of this revision.Feb 20 2023, 11:47 AM

Right now this has two issues I'd like to ask how to resolve.

  1. The libc/src/__support/OSUtil/gpu/quick_exit.cpp file currently cannot include the architectures header. It's not seen as in the path. I figured it just needed to depend on the common target to use it.
  2. The object library is created, but not included in the final libcgpu.a. How does the logic for including object libraries in with the entrypoints work?
  1. The headers weren't being added correctly and I fixed that.
  2. I was accidentally using the libc.__support.OSUtil.osutil target which is just a header library.

So this works now.

sivachandra accepted this revision.Feb 22 2023, 11:02 AM
This revision is now accepted and ready to land.Feb 22 2023, 11:02 AM
This revision was automatically updated to reflect the committed changes.