This is an archive of the discontinued LLVM Phabricator instance.

[nfc][libomptarget] Refactor nvptx/target_impl.cu
ClosedPublic

Authored by JonChesterfield on Jan 14 2020, 10:03 AM.

Details

Summary

[nfc][libomptarget] Refactor nxptx/target_impl.cu

Use __kmpc_impl_atomic_add instead of atomicAdd to match the rest of the file.
Alternatively, target_impl.cu could use the cuda functions directly. Using a mixture in this
file was an oversight, happy to resolve in either direction.

Removed some comments that look outdated.

Call __kmpc_impl_unset_lock directly to avoid a redundant diagnostic and remove an implict
dependency on interface.h.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJan 14 2020, 10:03 AM
  • Avoid trip through interface for target_impl
JonChesterfield retitled this revision from [nfc][libomptarget] Use __kmpc_atomic_add in target_impl.cu to [nfc][libomptarget] Refactor in target_impl.cu.Jan 14 2020, 10:19 AM
JonChesterfield edited the summary of this revision. (Show Details)
JonChesterfield edited the summary of this revision. (Show Details)
JonChesterfield retitled this revision from [nfc][libomptarget] Refactor in target_impl.cu to [nfc][libomptarget] Refactor nvptx/target_impl.cu.
JonChesterfield edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jan 14 2020, 11:04 AM
This revision was automatically updated to reflect the committed changes.
JonChesterfield marked an inline comment as done.