This is an archive of the discontinued LLVM Phabricator instance.

[Polly] [HACK] [WIP] Add functionality to GPUJIT to track unified memory.
ClosedPublic

Authored by bollu on Jul 28 2017, 5:25 AM.

Event Timeline

bollu created this revision.Jul 28 2017, 5:25 AM
bollu added a comment.Jul 28 2017, 5:25 AM

Clearly, this entire patch is a hack. I'd like to know how to add tests for this, and how to ensure that this gets reverted at some point in the future :)

grosser edited edge metadata.Aug 1 2017, 5:33 AM

Hi Siddharth,

I think it is OK to upstream this code, assuming you write and document it in a generic way and explain how it is used.

tools/GPURuntime/GPUJIT.c
37

Why is this needed. Maybe upstream separately?

1225

There seem to be other situations where a context might already be available. I suggest to upstream this independently.

bollu updated this revision to Diff 109314.Aug 2 2017, 3:48 AM
bollu marked an inline comment as done.
  • Rebase on top of master and take tobias' suggestion into account.
bollu updated this revision to Diff 109315.Aug 2 2017, 3:50 AM

[NFC] upload proper diff.

grosser accepted this revision.Aug 2 2017, 3:54 AM

LGTM in general.

tools/GPURuntime/GPUJIT.c
1437

I don't think it adds any value to discuss COSMO here. Instead, it suggest to just explain what kind of behavior you seeand how this is addressed here.

1439

cudaFree

This revision is now accepted and ready to land.Aug 2 2017, 3:54 AM
bollu updated this revision to Diff 109317.Aug 2 2017, 4:01 AM
  • [NFC] explain hack better
bollu marked 2 inline comments as done.Aug 2 2017, 4:01 AM
bollu updated this revision to Diff 109318.Aug 2 2017, 4:04 AM
  • [NFC] lint fix.
This revision was automatically updated to reflect the committed changes.
singam-sanjay edited edge metadata.Aug 3 2017, 12:51 PM

This breaks my Julia build.

How are the cudaFree and cudaMallocManaged functions resolved ? Can you add a patch to link GPURuntime to cudart ?