Skip to content

Commit 26f27d1

Browse files
committed
Clean up peer access functions in libsyclinterface
Discard unused header for sstream
1 parent 95e7478 commit 26f27d1

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

libsyclinterface/source/dpctl_sycl_device_interface.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#include "dpctl_sycl_type_casters.hpp"
3434
#include "dpctl_utils_helper.h"
3535
#include <algorithm>
36-
#include <sstream>
3736
#include <stddef.h>
3837
#include <sycl/sycl.hpp> /* SYCL headers */
3938
#include <utility>
@@ -950,15 +949,15 @@ void DPCTLDevice_EnablePeerAccess(__dpctl_keep const DPCTLSyclDeviceRef DRef,
950949
if (D && PD) {
951950
if (_CallPeerAccess(*D, *PD)) {
952951
try {
952+
throw std::invalid_argument("test");
953953
D->ext_oneapi_enable_peer_access(*PD);
954954
} catch (std::exception const &e) {
955955
error_handler(e, __FILE__, __func__, __LINE__);
956956
}
957957
}
958958
else {
959-
std::ostringstream os;
960-
os << "Given devices do not support peer access";
961-
error_handler(os.str(), __FILE__, __func__, __LINE__);
959+
error_handler("Devices do not support peer access", __FILE__,
960+
__func__, __LINE__);
962961
}
963962
}
964963
return;
@@ -978,9 +977,8 @@ void DPCTLDevice_DisablePeerAccess(__dpctl_keep const DPCTLSyclDeviceRef DRef,
978977
}
979978
}
980979
else {
981-
std::ostringstream os;
982-
os << "Given devices do not support peer access";
983-
error_handler(os.str(), __FILE__, __func__, __LINE__);
980+
error_handler("Devices do not support peer access", __FILE__,
981+
__func__, __LINE__);
984982
}
985983
}
986984
return;

0 commit comments

Comments
 (0)