syclacademy icon indicating copy to clipboard operation
syclacademy copied to clipboard

Eradicate `.select_device()`

Open keryell opened this issue 3 years ago • 10 comments

There are still some old Java style code like

auto gpuDevice = gpu_selector_v.select_device();

in Lesson_Materials/Lecture_5_Device_Discovery/index.html for SYCLcon 2021 which should be replaced by just

device gpuDevice { gpu_selector_v };

keryell avatar Apr 26 '21 22:04 keryell

Probably the part "Creating a custom device selector" can be also updated to just using lambda.

keryell avatar Apr 26 '21 22:04 keryell

Also Code_Exercises/Exercise_05_Device_Selection/solution.cpp should be updated to modern SYCL 2020 too.

keryell avatar Apr 26 '21 23:04 keryell

The selector in Code_Exercises/Exercise_07_USM_Selector/solution.cpp should be modernized too.

keryell avatar Apr 26 '21 23:04 keryell

The selector in Code_Exercises/Exercise_08_USM_Vector_Add/solution.cpp should be modernized too.

keryell avatar Apr 27 '21 00:04 keryell

The selector in Code_Exercises/Exercise_09_Synchronization/solution.cpp and in should be modernized too. The selector in Code_Exercises/Exercise_10_Managing_Dependencies/solution.cpp and in should be modernized too.

keryell avatar Apr 27 '21 00:04 keryell

This is part of a more general problem: https://github.com/codeplaysoftware/syclacademy/issues/73

keryell avatar Oct 08 '21 00:10 keryell

Can this be closed since #85 has been merged now @keryell ?

rodburns avatar Oct 28 '21 20:10 rodburns

Oops! It is still used in version presented by @jamesreinders right now in Lecture_05_Device_Discovery! :-(

keryell avatar Nov 01 '21 20:11 keryell

I have looked at the latest main and there are still:

auto gpuDevice = gpu_selector{}.select_device();
auto chosenDevice = default_selector{}.select_device();

keryell avatar Nov 01 '21 20:11 keryell

And there are still 3 times struct my_gpu_selector : public device_selector and its content.

keryell avatar Nov 01 '21 20:11 keryell