[libc-commits] [PATCH] D146681: [libc] Add a loader utility for NVPTX architectures for testing

Jon Chesterfield via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Mar 23 11:28:49 PDT 2023


JonChesterfield added inline comments.


================
Comment at: libc/utils/gpu/loader/amdgpu/Loader.cpp:284
+    void *dev_ptr = nullptr;
+    hsa_amd_memory_pool_allocate(finegrained_pool, size,
+                                 /*flags=*/0, &dev_ptr);
----------------
JonChesterfield wrote:
> This probably should check the return codes
Agents allow access can fail, let's treat that the same as oom as they look the same to the caller.

Leaking on the failure path is fine by me.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146681



More information about the libc-commits mailing list