Backend defaults to setting WGP mode to 0 or 1 depending on the cumode
feature. For PAL clients we want PAL to set this mode.
Adding check to prevent the backend overriding whatever the front end has set.
Not sure what you're getting at here.
We could work around this by always setting the CuMode sub target feature in any PAL front-end - then the value passed in from PAL would always be honoured, but that seems more hacky to me.
We can change CuMode to be an attribute rather than sub target feature as a separate change, but that pre-exists this work.
I'll put a test together if we can agree an approach.
Always setting the subtarget feature does seem like the right approach to me.
Changing it to a target attribute may be something to consider. It's one of those non-trivial things because it would have to be added to all functions, not just the kernel entry point, but...