From 6aae49d281e2cd0d405f6889f287de9967e4b28c Mon Sep 17 00:00:00 2001 From: deegan Date: Thu, 3 Sep 2026 14:40:24 +0200 Subject: [PATCH] pointer support for rocm7 --- inc/mkn/gpu/rocm/cls.hpp | 4 +++- res/mkn/hipcc_sys.yaml | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 res/mkn/hipcc_sys.yaml diff --git a/inc/mkn/gpu/rocm/cls.hpp b/inc/mkn/gpu/rocm/cls.hpp index 183310a..2d11913 100644 --- a/inc/mkn/gpu/rocm/cls.hpp +++ b/inc/mkn/gpu/rocm/cls.hpp @@ -63,7 +63,9 @@ struct Pointer { if (!t) throw std::runtime_error("invalid nullptr"); MKN_GPU_ASSERT(hipPointerGetAttributes(&attributes, t)); } - bool is_host_ptr() const { return type() == hipMemoryTypeHost; } + bool is_host_ptr() const { + return type() == hipMemoryTypeUnregistered || type() == hipMemoryTypeHost; + } bool is_device_ptr() const { return type() == hipMemoryTypeDevice || type() == hipMemoryTypeArray; } diff --git a/res/mkn/hipcc_sys.yaml b/res/mkn/hipcc_sys.yaml new file mode 100644 index 0000000..18e6085 --- /dev/null +++ b/res/mkn/hipcc_sys.yaml @@ -0,0 +1,12 @@ + +super: settings + +compiler: + mask: + g++: hipcc + +file: + - type: cpp:cxx:cc + archiver: ar -cr + compiler: hipcc -std=c++20 -fPIC + linker: hipcc -lamdhip64