KhronosGroup / SYCL-Docs

SYCL Open Source Specification
Other
107 stars 67 forks source link

Device selector determinism #327

Open nolmoonen opened 1 year ago

nolmoonen commented 1 year ago

The description for the device selector aspect_selector in Section 4.6.1.1 of the SYCL 2020 specification contains the following statement:

If no aspects are passed in, the generated selector behaves like default_selector.

In designing a test for this, the following question arose: does the default_selector (and the aspect_selector without aspects) always return the same device?

Related discussion: https://github.com/KhronosGroup/SYCL-CTS/pull/83#discussion_r667940618

gmlueck commented 1 year ago

Just repeating here what I said in the CTS discussion linked above ... the SYCL 2020 spec does not currently state that default_selector_v must return the same device each time it is called. Perhaps it would make sense to provide this guarantee, but we do not currently say this.

keryell commented 1 year ago

Obviously we should precise this in the case there are no hot-plugable devices in the system or if a device breaks during the program execution and disappears from the back-end.

TApplencourt commented 1 year ago

The execution environment for a SYCL application has a fixed number of root devices which does not vary as the application executes.

:p