[PATCH] D80118: Unrank mcuMemHostRegister tensor argument.

Stephan Herhut via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 19 02:40:29 PDT 2020


herhut accepted this revision.
herhut added a comment.
This revision is now accepted and ready to land.

Nice cleanup, thanks!



================
Comment at: mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp:106
+extern "C" void mcuMemHostRegisterFloat(int64_t rank, void *ptr) {
+  auto *desc = static_cast<StridedMemRefType<float, 1> *>(ptr);
+  auto sizes = llvm::ArrayRef<int64_t>(desc->sizes, rank);
----------------
This is a bit fishy, as you rely on the inner layout of the descriptor declared in a different file. It would be nicer to have an interface in that header that allows to do this.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80118





More information about the llvm-commits mailing list