[libc-commits] [PATCH] D153388: [libc] Add basic utility support for timing functions on the GPU

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Jun 20 19:12:26 PDT 2023


sivachandra added inline comments.


================
Comment at: libc/src/__support/GPU/amdgpu/utils.h:154
+LIBC_INLINE uint64_t time() {
+  if constexpr (__has_builtin(__builtin_amdgcn_s_sendmsg_rtnl))
+    return __builtin_amdgcn_s_sendmsg_rtnl(0x83);
----------------
For consistency, use `LIBC_HAS_BUILTIN`: https://github.com/llvm/llvm-project/blob/main/libc/src/__support/macros/config.h#L29


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153388



More information about the libc-commits mailing list