[libc-commits] [PATCH] D149581: [libc] Change GPU startup and loader to use multiple kernels

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed May 3 18:34:29 PDT 2023


jhuber6 added a comment.

In D149581#4317364 <https://reviews.llvm.org/D149581#4317364>, @JonChesterfield wrote:

> Splitting into three kernels seems better. These implementations are very heavily copy&pasted between amdgpu and nvptx though. A bunch of stuff is inherently target specific, notably the kernel launch machinery, but things like the kernel argument structs are very easily factored into a header, and I think start.cpp are ~ a hundred lines of fairly subtle code that is identical on nvptx&amdgpu except for the spelling of kernel calling convention. I think that would be worth cleaning up - it's likely to be quicker to deduplicate than to review the duplication

The structs should definitely be common, you're right. The startup code itself I think should remain separate in different directories, it's how the other `libc` targets do it just for clarity of implementation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149581



More information about the libc-commits mailing list