-
Notifications
You must be signed in to change notification settings - Fork 798
Closed
Labels
Description
The issue is submitted as a follow-up from #5348, where @bader highlighted a design problem: our compiler implementation of optional kernel features design is too tied with the runtime implementation, which is a bad design choice and it could cause hard-to-debug issues in the future.
In particular, see the following two comments:
- first: we have a hardcoded map from
sycl::aspect
enum to a string which is used to print nice diagnostic messages. The problem here is that: (a) enum must be regularly updated in sync with its actual definition in runtime headers and (b) that hardcoded mapping could be incompatible with other SYCL implementations using our compiler (for example in downstreams) - second: we have a hardcoded magic value
6
, which corresponds toaspect::fp64
. This has the same issues as (1), but on top of that mismatch of the value between the runtime and the compiler could cause functional issues later on: compiler will report thatdouble
is used, whilst runtime will think that some other aspect is used or vice-versa