Skip to content

Commit

Permalink
hip: Fix HIP version check.
Browse files Browse the repository at this point in the history
  • Loading branch information
fweig committed Feb 5, 2024
1 parent 0a6a8fd commit 5d00ebf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/xpu/detail/platform/hip_cuda/prelude.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
#else
#include <hip/hip_runtime_api.h>
#define CUHIP(expr) XPU_CONCAT(hip, expr)
#define XPU_HIP_VERSION_AT_LEAST(major, minor) ((major) * 100 + (minor) >= HIP_VERSION_MAJOR * 100 + HIP_VERSION_MINOR)

#define XPU_HIP_VERSION (HIP_VERSION_MAJOR * 100 + HIP_VERSION_MINOR)
#define XPU_HIP_VERSION_AT_LEAST(major, minor) (XPU_HIP_VERSION >= (major * 100 + minor))

#if XPU_HIP_VERSION_AT_LEAST(6, 0)
#define HIP_PTR_TYPE(ptrattr) (ptrattr).type
Expand Down

0 comments on commit 5d00ebf

Please sign in to comment.