[PATCH] D120298: [HIP] Support `--default-stream`

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 21 19:58:32 PST 2022


yaxunl created this revision.
yaxunl added a reviewer: tra.
Herald added subscribers: dexonsmith, dang.
yaxunl requested review of this revision.

Introduce `--default-stream={legacy|per-thread}` option to
support per-thread default stream for HIP runtime.

When `--default-stream=per-thread`, HIP kernels are
launched through hipLaunchKernel_spt instead of
hipLaunchKernel. Also `-DHIP_API_PER_THREAD_DEFAULT_STREAM`
is passed to clang -cc1 to enable other per-thread stream
API's.


https://reviews.llvm.org/D120298

Files:
  clang/include/clang/Basic/LangOptions.h
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/CGCUDANV.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/CodeGenCUDA/Inputs/cuda.h
  clang/test/CodeGenCUDA/kernel-call.cu
  clang/test/Driver/hip-options.hip

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120298.410437.patch
Type: text/x-patch
Size: 7774 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220222/8404e939/attachment-0001.bin>


More information about the cfe-commits mailing list