From 5b89ee8be69498332cf556a65befde432792b011 Mon Sep 17 00:00:00 2001 From: JackAKirk Date: Tue, 6 Feb 2024 14:38:45 +0000 Subject: [PATCH] [CUDA] Use camelCase always (applied to usm_p2p.cpp). (#1311) * Use camelCase always. Also return caught UR error directly. Signed-off-by: JackAKirk * Revert non camelCase format changes. From previous commit. Signed-off-by: JackAKirk --------- Signed-off-by: JackAKirk --- source/adapters/cuda/usm_p2p.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/adapters/cuda/usm_p2p.cpp b/source/adapters/cuda/usm_p2p.cpp index b80aa80854..3a85ca2284 100644 --- a/source/adapters/cuda/usm_p2p.cpp +++ b/source/adapters/cuda/usm_p2p.cpp @@ -45,16 +45,16 @@ UR_APIEXPORT ur_result_t UR_APICALL urUsmP2PPeerAccessGetInfoExp( UrReturnHelper ReturnValue(propSize, pPropValue, pPropSizeRet); int value; - CUdevice_P2PAttribute cu_attr; + CUdevice_P2PAttribute cuAttr; try { ScopedContext active(commandDevice->getContext()); switch (propName) { case UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED: { - cu_attr = CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED; + cuAttr = CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED; break; } case UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED: { - cu_attr = CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED; + cuAttr = CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED; break; } default: { @@ -62,8 +62,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urUsmP2PPeerAccessGetInfoExp( } } - UR_CHECK_ERROR(cuDeviceGetP2PAttribute( - &value, cu_attr, commandDevice->get(), peerDevice->get())); + UR_CHECK_ERROR(cuDeviceGetP2PAttribute(&value, cuAttr, commandDevice->get(), + peerDevice->get())); } catch (ur_result_t err) { return err; }