From fcee078a70f99954a0c01bb20c9b4601e40155b1 Mon Sep 17 00:00:00 2001 From: Gerardo Hernandez Date: Mon, 2 Jun 2025 14:25:35 +0100 Subject: [PATCH] SWDEV-535598 - do not throw in get_warp_size() because it is marked not only as __host__ but also __device__ --- include/ck/utility/get_id.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/ck/utility/get_id.hpp b/include/ck/utility/get_id.hpp index e350adbc1a..06f36bb544 100644 --- a/include/ck/utility/get_id.hpp +++ b/include/ck/utility/get_id.hpp @@ -4,6 +4,7 @@ #pragma once #include "ck/ck.hpp" +#include namespace ck { @@ -18,11 +19,9 @@ __host__ __device__ constexpr index_t get_warp_size() #endif } else { hipDeviceProp_t props; - hipError_t status = hipGetDeviceProperties(&props, get_device_id()); - - if(status != hipSuccess) - throw std::runtime_error("Failed to get device properties when trying to get warp size"); + [[maybe_unused]] hipError_t status = hipGetDeviceProperties(&props, get_device_id()); + assert(status == hipSuccess && "Failed to get device properties when trying to get warp size"); return props.warpSize; } }