SWDEV-535598 - do not throw in get_warp_size() because it is marked not only as __host__ but also __device__

This commit is contained in:
Gerardo Hernandez
2025-06-02 14:25:35 +01:00
parent aae7a84fb2
commit fcee078a70

View File

@@ -4,6 +4,7 @@
#pragma once
#include "ck/ck.hpp"
#include <assert.h>
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;
}
}