I think these API functions should also include the source location pointer from https://reviews.llvm.org/D87946. We need to consider renaming the *_issue and *_wait functions to extend the *_loc API the aforementioned patch is introducing. E.g. after D87946 the "current" data begin API function will be __tgt_target_data_begin_mapper_loc, so this patch should extend that name as __tgt_target_data_begin_mapper_loc_issue and __tgt_target_data_begin_mapper_loc_wait. Because both patches make changes to the API, I think it's better to wait until the former patch has been committed.
Tue, Sep 29
Ping!. Could you please take a look at it?
Sep 22 2020
Passing handle as input/output argument to __tgt_target_data_begin_mapper_<issue|wait>.
Sep 21 2020
Sep 15 2020
- Fixed bug when creating the wait runtime call.
- Added constants to ease the access to OffloadArrays in the function detectIssue.
Sep 8 2020
But it seems not to include any changes to the test. why not? because this doesn't have an impact without resolving the issue you mentioned?
Sep 7 2020
Sep 1 2020
Aug 31 2020
- Adding regression test
rG8931add61705 [OpenMPOpt][HideMemTransfersLatency] Get values stored in offload arrays.
- Removing factory function for OffloadArray, now using it as member function.
- Calculating the accessed index of the OffloadArray using the offset returned by GetPointerBaseWithConstantOffset.
Aug 28 2020
Aug 27 2020
Aug 25 2020
- NIT changes to comments
- NIT changes.
- Tried to split the patch, but then we couldn't test for the values we got.
Aug 24 2020
Aug 21 2020
- Require comments
- Added REQUIRES: assertions to regression test.
NIT: Refactor some variable declarations.
Aug 20 2020
- Adding regression test.
Aug 18 2020
- Removing comparison with explicit runtime functions from canBeMovedDownwards.
- Minor refactors to comments and arguments.
Adding constraint mayReadFromMemory to canBeMovedDownwards.
Aug 17 2020
- Refactor to some names and other minor changes.
- Update regression test to expect the split runtime calls.
Aug 16 2020
Aug 13 2020
- Isolating split function.
But we need to add the structure MemoryTranfer too. Also remember this assumes we moved the declarations in OpenMPOpt.cpp to OpenMPOpt.h, so we would have to put this new code into OpenMPOpt.cpp, which I think is not a problem at all, but just to consider it.
Why do we need anything to split the runtime calls? The arguments should be sufficient for the split, no?
Aug 12 2020
- Changing std::vector for SmallVector in split function.
Sorry. Error updating last patch.
- Fix to canBeMovedDownwards
- Fix to canBeMovedDownwards.
Can you add parent revisions for this and maybe other related patches? It will be easier to know the order.
- Removing move code.
- Splitting patch into canBeMoved logic and splitting the runtime call.
- Fix to minor bug in detectIssue.
- Update regression test. Now checks that the runtime call __tgt_target_data_begin is successfully split. Not sure if this should go in another patch.
Aug 11 2020
- Using OMPIRBuilder instead of manually generating the runtime calls.
- Updating regression test for this optimization.
Aug 10 2020
I think if I only add the declarations of __tgt_target_data_begin_issue and __tgt_target_data_being_wait the linking process will fail. How should I define the wait function?, the issue is just a wrapper of the current function, but as we don't have Shilei's patch merged yet I would have to create something that does nothing and change it later when the asynchronous stuff is merged.
Aug 7 2020
Jul 31 2020
- Fix code style issue.
- Problem with getModRefInfo, it always returns that a value V may be modified, even when running opt with -aa-pipeline=basic-aa.
Jul 30 2020
I'm not totally sure about this. There's a lot of test setup relative to the test case itself, and I can't work out by reading the test itself what it's checking. What are all the mock classes for?
I'm wondering if we would be better off refactoring the code it intends to test so that it needs less setup.
Jul 25 2020
Jul 20 2020
- Refactors discussed made.
- OpenMPOpt unit tests infrastructure merged.
Jul 18 2020
Wow, this required more machinery than I expected.. thanks!
Should we merge this with the MemoryTransfer logic so we can test it?
Finished getting values in offload arrays
Unit test for getValuesInOfflArrays working.
Jul 9 2020
Should we merge the test header into the test cpp?
We need an actual unit test that runs :)
Jul 7 2020
- Exposing getValuesInOfflArrays() to make it unit testable.
- Adding static function needed in unittest.
- Fixing description in header of new file.
Jul 5 2020
- Fix heavyComputation1 test case.
- Passing all test cases through optimizer in order to remove some unnecessary code.
Jul 4 2020
- Creating the first unit test for OpenMPOpt. This creation led me to move the declaration of OpenMPOpt and OMPInformationCache to OpenMPOpt.h.
- I propose refactoring the optimizations to separate structures so that they are easily maintainable and testable.
Jun 29 2020
Including all diff
Jun 28 2020
Changing from returning status code to bool + Getting MemorySSAAnalysis through OMPInfoCache
Jun 1 2020
Added FileCheck constructs
May 24 2020
Added __tgt_target_data_begin to the commented original code, just to make the test cases easier to read.
May 22 2020
- Fixed illegal movement: now there's one negative test case (issue cannot be moved) and one positive (with noalias) where the issue can be moved.
- Added data transfer only test case.
May 16 2020
This is great! Thanks for starting. I left two comments but this looks pretty good to me.
We will later need positive and negative test cases. We can make those smaller though,
you just have the memory transfer request, no target region. We want to verify we move it
properly, e.g., when it appears in loops, in conditionals, there are memory accesses
Btw. if it helps, we can also create a "thinner" version of the API that takes less arguments
and is applicable only in some often occurring cases, e.g., we can remove the baseptr array
and use it only if ptr and baseptr have the same entries anyway.
May 15 2020
Mar 21 2020
Mar 20 2020
Removing unnecessary check for variadic function.
Mar 19 2020
Mar 15 2020
Minor change to test file + adding std::move to object copy.