mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-07-02 13:17:36 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user