Skip to content

Optionally enforce algorithm to pick the default device #692

@keryell

Description

@keryell

When using some weird devices or debugging OpenCL stacks & compilers, it does not make sense to run the application on anything else.

If I correctly understand find_default_device()algorithm in https://github.com/boostorg/compute/blob/master/include/boost/compute/system.hpp#L210 on using the very handyBOOST_COMPUTE_DEFAULT_ variables, when some criteria cannot be fulfilled we fall-back on returning the first GPU found, etc.

So I'd like to add another variable environment for example (BOOST_COMPUTE_DEFAULT_ENFORCE? Bike-sheding welcome! :-) ) to change the selection algorithm to throw when a BOOST_COMPUTE_DEFAULT_ variable is set but the criteria cannot be fulfilled.

Any comment?

I can write a PR.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions