[PATCH] D76563: Fix all-reduce int tests by host-registering memrefs.Reduce amount of boiler plate to register host memory.

Christian Sigg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 22 12:51:04 PDT 2020


csigg marked 2 inline comments as done.
csigg added inline comments.


================
Comment at: mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp:97
+  assert(sizes.size() == strides.size());
+  llvm::SmallVector<int64_t, 4> dense_strides(strides.size());
+
----------------
mehdi_amini wrote:
> FYI: clang-tidy flags this variable name
Thanks. Fixed.


================
Comment at: mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp:109
+
+  std::fill_n(pointer, count, value);
+  mcuMemHostRegister(pointer, count * sizeof(T));
----------------
mehdi_amini wrote:
> Why does the registration requires to overwrite the array?
It's not required, and it would probably be good to remove (or have an op to allocate host-registered memory for tests). I don't want to change the functionality as part of this CL though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76563





More information about the llvm-commits mailing list