Skip to content

Commit a042b84

Browse files
committed
[UR][HIP] Fix narrowing conversion of ur_context_info_t
Converting ur_context_info_t (int32_t) to uint32_t was a narrowing conversion and it was making Visual Studio compiler error out during compilation.
1 parent f83b1f6 commit a042b84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unified-runtime/source/adapters/hip/context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ urContextGetInfo(ur_context_handle_t hContext, ur_context_info_t propName,
6161

6262
UrReturnHelper ReturnValue(propSize, pPropValue, pPropSizeRet);
6363

64-
switch (uint32_t{propName}) {
64+
switch (propName) {
6565
case UR_CONTEXT_INFO_NUM_DEVICES:
6666
return ReturnValue(static_cast<uint32_t>(hContext->Devices.size()));
6767
case UR_CONTEXT_INFO_DEVICES:

0 commit comments

Comments
 (0)