Skip to content

Clarify get_kernel_ids() behaviours in the case of dynamic linking of separate SYCL applications #209

Description

@keryell

There is a global free function to get the ids of all the known kernels but it is not clear how to return all the kernels when for example a SYCL application use some other libraries which might be loaded lazily later which also use SYCL internally in a hidden way.
While the concept of dynamic library is not defined in the ISO C++ standard, concrete SYCL programs have to deal with it.

std::vector<kernel_id> get_kernel_ids();

Returns: A vector with the identifiers for all kernels defined in the SYCL application. This does not include identifiers for any device built-in kernels.

Can we say that this should return at least all the kernels usable at some point in the life of a program?
So the kernels from not yet loaded library might not be there, but they should be once the library is loaded.
Once the library is unloaded, the kernels might be still returned by get_kernel_ids(), if it is difficult to figure out which are no longer usable.
On the other hand, a conformant SYCL implementation might not be required to implement kernels in dynamic libraries.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions