Skip to content

Commit a8868fb

Browse files
committed
Address feedback.
Signed-off-by: Julian Oppermann <[email protected]>
1 parent 880b5ad commit a8868fb

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

sycl/source/detail/kernel_bundle_impl.hpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ class kernel_bundle_impl {
550550
// Device globals are usually statically allocated and registered in the
551551
// integration footer, which we don't have in the RTC context. Instead, we
552552
// dynamically allocate storage tied to the executable kernel bundle.
553-
for (auto *DeviceGlobalEntry :
553+
for (DeviceGlobalMapEntry *DeviceGlobalEntry :
554554
PM.getDeviceGlobalEntries(DeviceGlobalIDVec)) {
555555

556556
size_t AllocSize = DeviceGlobalEntry->MDeviceGlobalTSize; // init value
@@ -703,15 +703,8 @@ class kernel_bundle_impl {
703703

704704
// Otherwise, if the device candidate is a sub-device it is also valid if
705705
// its parent is valid.
706-
if (!getSyclObjImpl(DeviceCand)->isRootDevice()) {
707-
try {
708-
return is_valid_device(
709-
DeviceCand.get_info<info::device::parent_device>());
710-
} catch (std::exception &e) {
711-
__SYCL_REPORT_EXCEPTION_TO_STREAM("exception in is_valid_device", e);
712-
}
713-
}
714-
return false;
706+
return !getSyclObjImpl(DeviceCand)->isRootDevice() &&
707+
is_valid_device(DeviceCand.get_info<info::device::parent_device>());
715708
}
716709

717710
DeviceGlobalMapEntry *get_device_global_entry(const std::string &Name,

0 commit comments

Comments
 (0)