[PATCH] D140226: [NVPTX] Introduce attribute to mark kernels without a language mode

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 13 10:13:27 PST 2023


jhuber6 added a comment.

In D140226#4052105 <https://reviews.llvm.org/D140226#4052105>, @aaron.ballman wrote:

> Precommit CI found failures that look relevant to the patch.
>
>> We may want to be able to mark certain regions as kernels even without being in an accepted CUDA or OpenCL language mode.
>
> Can you explain this a bit more? Under what circumstances would you want to do this?

Yeah, I need to work on this some more. A previous version worked fine but it duplicated some logic, I'm not sure if there's a good way to re-use the existing kernel logic without breaking some of the assumptions. The desire was to be able to emit a kernel that can be called externally via cross-compilation. E.g. `clang foo.c --target=nvptx64-nvidia-cuda`. The intended use-case was for testing experimental `libc` implementations using integration tests.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140226



More information about the cfe-commits mailing list