[libc-commits] [PATCH] D146681: [libc] Add a loader utility for NVPTX architectures for testing
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Mar 23 11:30:10 PDT 2023
jhuber6 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:
> 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.
So, the only way it can fail is if the runtime is uninitialized, the arguments are null, or the pointer isn't allowed to have access. I think we can statically assert that we won't meet those criteria in usage.
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