[PATCH] D116967: [HIP] Fix device malloc/free

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 10 13:42:07 PST 2022


tra accepted this revision.
tra added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Headers/__clang_hip_runtime_wrapper.h:80
 
+#if HIP_VERSION_MAJOR > 4 || (HIP_VERSION_MAJOR == 4 && HIP_VERSION_MINOR >= 5)
+extern "C" __device__ unsigned long long __ockl_dm_alloc(unsigned long long __size);
----------------
Nit: perhaps something like this would express the intent a bit more directly:

```
# if HIP_VERSION_MAJOR*100+HIP_VERSION_MINOR*10 > 450
```




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

https://reviews.llvm.org/D116967



More information about the cfe-commits mailing list