Remove command line parameters for platform and device selection
Hi. This change will impact our automated execution. Is there really need to remove this kind of selection without introducing new solution?
There is already another way of selecting devices and platforms using the CL_DEVICE_INDEX, CL_PLATFORM_INDEX and CL_DEVICE_TYPE environment variables. The command-line syntax is quirky and will get in the way of introducing a cleaner command-line parsing logic.
@ellnor01 The help text there would need updating as well.
@gwawiork Any more feedback on this change?
There is already another way of selecting devices and platforms using the
CL_DEVICE_INDEX,CL_PLATFORM_INDEXandCL_DEVICE_TYPEenvironment variables. The command-line syntax is quirky and will get in the way of introducing a cleaner command-line parsing logic.@ellnor01 The help text there would need updating as well.
I would prefer command-line arguments over env var as relying on env vars can be fragile (it's easy to miss setting them up etc). Also, going bit further, just platform_index and device_index doesn't guarantee portability of these indices across different systems due to dependence on enumeration order. We had to add a check for platform name to ensure we indeed run on the intended platform irrespective or enumeration order.
@nikhiljnv Agree that's where we want to end up but currently we have a mix of environment variables and command line parameters for device/platform configuration (with both supported in some cases!) and the command line syntax is non-standard/cryptic/atrocious so we will have to break the existing command line interface. What I'm proposing we do is:
- Remove the current command line syntax and use environment variables for all things device/platform configuration (already the case for device types). That's this PR. This lowers a bar to re-design command line parsing.
- Re-introduce a clean command line interface when we get to re-designing command line parsing.
- Deprecate and remove all the environment variables.
It does mean two breaking changes but we can stage them.
@kpet Rebased and CI checks are passing.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.