From c52392d05232cc386c107e3e04f381c8adf5614b Mon Sep 17 00:00:00 2001 From: xingjiangjun <109590588+xingjiangjun@users.noreply.github.com> Date: Wed, 14 Oct 2026 19:47:59 +0800 Subject: [PATCH 1/2] fix: add CPU memory space detection Add the missing GetMemorySpace specialization for the CPU device. CPU memory is classified as host memory. --- src/devices/cpu/device_.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/devices/cpu/device_.h b/src/devices/cpu/device_.h index 72e0d1a..632e74b 100644 --- a/src/devices/cpu/device_.h +++ b/src/devices/cpu/device_.h @@ -8,6 +8,11 @@ namespace infini::ccl { template <> struct DeviceEnabled : std::true_type {}; +template <> +MemorySpace GetMemorySpace(const void * /*ptr*/) { + return MemorySpace::kHost; +} + } // namespace infini::ccl #endif // INFINI_CCL_DEVICES_CPU_DEVICE_H_ From 27e276b2ac7056bf59223f9eb5ec86fcb63e521b Mon Sep 17 00:00:00 2001 From: xingjiangjun <109590588+xingjiangjun@users.noreply.github.com> Date: Thu, 15 Oct 2026 12:12:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?style:=20format=20CPU=20memory=20space=20sp?= =?UTF-8?q?ecialization=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/devices/cpu/device_.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/cpu/device_.h b/src/devices/cpu/device_.h index 632e74b..22b1f36 100644 --- a/src/devices/cpu/device_.h +++ b/src/devices/cpu/device_.h @@ -9,7 +9,7 @@ template <> struct DeviceEnabled : std::true_type {}; template <> -MemorySpace GetMemorySpace(const void * /*ptr*/) { +MemorySpace GetMemorySpace(const void* /*ptr*/) { return MemorySpace::kHost; }