Skip to content

Commit 0599efb

Browse files
committed
Address review comments
1 parent 9b6e22f commit 0599efb

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

sycl/source/detail/device_binary_image.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ std::string_view DeviceBinaryProperty::asStringView() const {
8484
assert(Prop->ValSize > 0 && "property size mismatch");
8585
// Byte array stores its size in first 8 bytes
8686
size_t Shift = Prop->Type == SYCL_PROPERTY_TYPE_BYTE_ARRAY ? 8 : 0;
87-
return {ur::cast<const char *>(Prop->ValAddr) + Shift, Prop->ValSize};
87+
return {ur::cast<const char *>(Prop->ValAddr) + Shift, Prop->ValSize - Shift};
8888
}
8989

9090
void RTDeviceBinaryImage::PropertyRange::init(sycl_device_binary Bin,

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,9 @@ ProgramManager::collectDependentDeviceImagesForVirtualFunctions(
748748
// when the dummy image does not support the device requirements, we
749749
// know the corresponding image providing virtual functions was not
750750
// linked and we must link the dummy image.
751-
if (doesDevSupportDeviceRequirements(Dev, *BinImage) + isDummyImage == 1)
751+
if (doesDevSupportDeviceRequirements(Dev, *BinImage) ^ isDummyImage)
752752
DeviceImagesToLink.insert(BinImage);
753+
753754
}
754755
}
755756

sycl/unittests/Extensions/VirtualFunctions/RuntimeLinking.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ TEST(VirtualFunctions, DummyImages) {
370370

371371
CapturedLinkingData.clear();
372372

373-
EXPECT_EQ(Plt.get_devices().size(), 2);
373+
EXPECT_EQ(Plt.get_devices().size(), 2u);
374374
sycl::queue Q2(sycl::aspect_selector({}, {sycl::aspect::fp64}));
375375

376376
// We now repeat what we did launching KernelH but on another

0 commit comments

Comments
 (0)