Skip to content

Commit 7fc5202

Browse files
committed
Skip creating image when no devices support it
Signed-off-by: Larsen, Steffen <[email protected]>
1 parent 147cb3d commit 7fc5202

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sycl/source/detail/device_image_impl.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,10 @@ class device_image_impl {
11131113
[&NewImageRef](const sycl::device &SDev) {
11141114
return !doesDevSupportDeviceRequirements(SDev, NewImageRef);
11151115
});
1116+
1117+
// If there are no devices that support the image, we skip it.
1118+
if (NewSupportingDevsEnd == SupportingDevs.begin())
1119+
continue;
11161120
SupportingDevs.erase(NewSupportingDevsEnd, SupportingDevs.end());
11171121

11181122
// Mark the image as input so the program manager will bring it into

0 commit comments

Comments
 (0)