Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions sycl/source/detail/kernel_bundle_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ class kernel_bundle_impl {
// TODO: Unify with c'tor for sycl::comile and sycl::build by calling
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test to sycl/unittests/SYCL2020 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a lit test for the multiple kernel stuff here: intel/llvm-test-suite#440
Is that what you are asking?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I was asking about adding a unit/component test in sycl/unittests/SYCL2020 directory of this repo. This test should be able to validate this behavior without any backend available.
Let's do it in a separate PR?

// sycl::join on vector of kernel_bundles

std::vector<device_image_plain> DeviceImages;
for (const kernel_bundle<bundle_state::object> &ObjectBundle :
ObjectBundles) {
for (const device_image_plain &DeviceImage : ObjectBundle) {
Expand All @@ -205,13 +204,15 @@ class kernel_bundle_impl {
}))
continue;

DeviceImages.insert(DeviceImages.end(), DeviceImage);
const std::vector<device_image_plain> VectorOfOneImage{DeviceImage};
std::vector<device_image_plain> LinkedResults =
detail::ProgramManager::getInstance().link(VectorOfOneImage,
MDevices, PropList);
MDeviceImages.insert(MDeviceImages.end(), LinkedResults.begin(),
LinkedResults.end());
}
}

MDeviceImages = detail::ProgramManager::getInstance().link(
std::move(DeviceImages), MDevices, PropList);

for (const kernel_bundle<bundle_state::object> &Bundle : ObjectBundles) {
const KernelBundleImplPtr BundlePtr = getSyclObjImpl(Bundle);
for (const std::pair<const std::string, std::vector<unsigned char>>
Expand Down