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

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 22 11:12:45 PDT 2020


mehdi_amini 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());
+
----------------
FYI: clang-tidy flags this variable name


================
Comment at: mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp:109
+
+  std::fill_n(pointer, count, value);
+  mcuMemHostRegister(pointer, count * sizeof(T));
----------------
Why does the registration requires to overwrite the array?


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