Skip to content

Commit 969e284

Browse files
committed
Merge branch 'sycl' into msan-always-reserve-origin-mem
2 parents eb728ff + db9f837 commit 969e284

39 files changed

+103
-94
lines changed

libclc/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,11 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
472472
elseif( ARCH STREQUAL nvptx OR ARCH STREQUAL nvptx64 )
473473
set( build_flags )
474474
set( opt_flags -O3 "--nvvm-reflect-enable=false" )
475+
set( MACRO_ARCH ${ARCH} )
475476
elseif( ARCH STREQUAL amdgcn )
476477
set( build_flags )
477478
set( opt_flags -O3 --amdgpu-oclc-reflect-enable=false )
479+
set( MACRO_ARCH ${ARCH} )
478480
else()
479481
set( build_flags )
480482
set( opt_flags -O3 )

sycl/source/detail/device_global_map.hpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,17 @@ class DeviceGlobalMap {
2727
DeviceGlobalMap(bool OwnerControlledCleanup)
2828
: MOwnerControlledCleanup{OwnerControlledCleanup} {}
2929

30+
DeviceGlobalMap(const DeviceGlobalMap &) = delete;
31+
DeviceGlobalMap &operator=(const DeviceGlobalMap &) = delete;
32+
3033
~DeviceGlobalMap() {
31-
if (!MOwnerControlledCleanup)
32-
for (auto &DeviceGlobalIt : MDeviceGlobals)
33-
DeviceGlobalIt.second->cleanup();
34+
try {
35+
if (!MOwnerControlledCleanup)
36+
for (auto &DeviceGlobalIt : MDeviceGlobals)
37+
DeviceGlobalIt.second->cleanup();
38+
} catch (std::exception &e) {
39+
__SYCL_REPORT_EXCEPTION_TO_STREAM("exception in ~DeviceGlobalMap", e);
40+
}
3441
}
3542

3643
void initializeEntries(const RTDeviceBinaryImage *Img) {

sycl/source/detail/device_global_map_entry.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ struct DeviceGlobalMapEntry {
6767
// Constructor for only initializing ID and pointer. The other members will
6868
// be initialized later.
6969
DeviceGlobalMapEntry(std::string UniqueId, const void *DeviceGlobalPtr)
70-
: MUniqueId(UniqueId), MDeviceGlobalPtr(DeviceGlobalPtr) {}
70+
: MUniqueId(std::move(UniqueId)), MDeviceGlobalPtr(DeviceGlobalPtr) {}
7171

7272
// Constructor for only initializing ID, type size, and device image scope
7373
// flag. The pointer to the device global will be initialized later.
7474
DeviceGlobalMapEntry(std::string UniqueId, const RTDeviceBinaryImage *Img,
7575
std::uint32_t DeviceGlobalTSize,
7676
bool IsDeviceImageScopeDecorated)
77-
: MUniqueId(UniqueId), MImages{Img},
77+
: MUniqueId(std::move(UniqueId)), MImages{Img},
7878
MImageIdentifiers{reinterpret_cast<uintptr_t>(Img)},
7979
MDeviceGlobalTSize(DeviceGlobalTSize),
8080
MIsDeviceImageScopeDecorated(IsDeviceImageScopeDecorated) {}

sycl/source/detail/property_set_io.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static IntT stringViewToInt(const std::string_view &SV) {
3030
if (SV.empty())
3131
return Result;
3232

33-
bool Negate = std::is_signed_v<IntT> && SV[0] == '-';
33+
const bool Negate = std::is_signed_v<IntT> && SV[0] == '-';
3434

3535
for (size_t I = static_cast<size_t>(Negate); I < SV.size(); ++I) {
3636
const char CurrentC = SV[I];

sycl/test-e2e/Graph/Explicit/buffer_copy_host2target.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// Extra run to check for leaks in Level Zero using UR_L0_LEAKS_DEBUG
44
// RUN: %if level_zero %{%{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not=LEAK %}
55
//
6-
// Intended - Host to device copy command not supported for OpenCL
76
// UNSUPPORTED: opencl
7+
// UNSUPPORTED-INTENDED: Host to device copy command not supported for OpenCL
88

99
#define GRAPH_E2E_EXPLICIT
1010

sycl/test-e2e/Graph/Explicit/buffer_copy_host2target_2d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// Extra run to check for leaks in Level Zero using UR_L0_LEAKS_DEBUG
44
// RUN: %if level_zero %{%{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not=LEAK %}
55
//
6-
// Intended - Host to device copy command not supported for OpenCL
76
// UNSUPPORTED: opencl
7+
// UNSUPPORTED-INTENDED: Host to device copy command not supported for OpenCL
88

99
#define GRAPH_E2E_EXPLICIT
1010

sycl/test-e2e/Graph/Explicit/buffer_copy_host2target_offset.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// Extra run to check for leaks in Level Zero using UR_L0_LEAKS_DEBUG
44
// RUN: %if level_zero %{%{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not=LEAK %}
55
//
6-
// Intended - Host to device copy command not supported for OpenCL
76
// UNSUPPORTED: opencl
7+
// UNSUPPORTED-INTENDED: Host to device copy command not supported for OpenCL
88

99
#define GRAPH_E2E_EXPLICIT
1010

sycl/test-e2e/Graph/Explicit/buffer_copy_target2host.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// Extra run to check for leaks in Level Zero using UR_L0_LEAKS_DEBUG
44
// RUN: %if level_zero %{%{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not=LEAK %}
55
//
6-
// Intended - Device to host copy command not supported for OpenCL
76
// UNSUPPORTED: opencl
7+
// UNSUPPORTED-INTENDED: Device to host copy command not supported for OpenCL
88

99
#define GRAPH_E2E_EXPLICIT
1010

sycl/test-e2e/Graph/Explicit/buffer_copy_target2host_2d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// Extra run to check for leaks in Level Zero using UR_L0_LEAKS_DEBUG
44
// RUN: %if level_zero %{%{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not=LEAK %}
55
//
6-
// Intended - Device to host copy command not supported for OpenCL
76
// UNSUPPORTED: opencl
7+
// UNSUPPORTED-INTENDED: Device to host copy command not supported for OpenCL
88

99
#define GRAPH_E2E_EXPLICIT
1010

sycl/test-e2e/Graph/Explicit/buffer_copy_target2host_offset.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// Extra run to check for leaks in Level Zero using UR_L0_LEAKS_DEBUG
44
// RUN: %if level_zero %{%{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not=LEAK %}
55
//
6-
// Intended - Device to host copy command not supported for OpenCL
76
// UNSUPPORTED: opencl
7+
// UNSUPPORTED-INTENDED: Device to host copy command not supported for OpenCL
88

99
#define GRAPH_E2E_EXPLICIT
1010

0 commit comments

Comments
 (0)