Skip to content

Commit efa7b0d

Browse files
[SYCL] Specify kernels in kernel_bundle for MultipleDevsCache (#7188)
This commit changes the ProgramRetain test in MultipleDevsCache to be explicit about which kernels should be included in the corresponding kernel bundle. This prevents the kernel bundle from inadvertently building programs that are unrelated to the test. Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
1 parent c47473e commit efa7b0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sycl/unittests/kernel-and-program/MultipleDevsCache.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,15 @@ TEST_F(MultipleDeviceCacheTest, ProgramRetain) {
137137
sycl::queue Queue(Context, Devices[0]);
138138
assert(Devices.size() == 2 && Context.get_devices().size() == 2);
139139

140-
auto Bundle =
141-
sycl::get_kernel_bundle<sycl::bundle_state::input>(Queue.get_context());
140+
auto KernelID = sycl::get_kernel_id<TestKernel<>>();
141+
auto Bundle = sycl::get_kernel_bundle<sycl::bundle_state::input>(
142+
Queue.get_context(), {KernelID});
142143
assert(Bundle.get_devices().size() == 2);
143144

144145
Queue.submit(
145146
[&](sycl::handler &cgh) { cgh.single_task<TestKernel<>>([]() {}); });
146147

147148
auto BundleObject = sycl::build(Bundle, Bundle.get_devices());
148-
auto KernelID = sycl::get_kernel_id<TestKernel<>>();
149149
auto Kernel = BundleObject.get_kernel(KernelID);
150150

151151
// Because of emulating 2 devices program is retained for each one in

0 commit comments

Comments
 (0)