[PATCH] D80051: [OpenMPOpt] Test case 1 - Latency Hiding for Host to Device Memory Transfers

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 15 19:01:11 PDT 2020


jdoerfert added a comment.

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
before/after, ...

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.



================
Comment at: llvm/test/Transforms/OpenMP/mem_transfer_hiding.ll:2
+; RUN: opt -S -openmpopt -stats < %s 2>&1
+; REQUIRES: asserts
+
----------------
Why do you want to run this with stats? I guess later you just use filecheck and verify the IR, right?


================
Comment at: llvm/test/Transforms/OpenMP/mem_transfer_hiding.ll:145
+;}
+define dso_local i32 @heavyComputation2(double* %a, i32 %size) {
+entry:
----------------
For the issue to be hoisted above the `rand` call the pointer needs to be noalias or we need better information about `rand`. As it is, `rand` might modify `a` which prevents moving.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80051/new/

https://reviews.llvm.org/D80051





More information about the llvm-commits mailing list