Skip to content

SYCLPropagateAspecUsage pass: compiler and runtime must not be tied to each other #5892

@AlexeySachkov

Description

@AlexeySachkov

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:

  1. 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)
  2. second: we have a hardcoded magic value 6, which corresponds to aspect::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 that double is used, whilst runtime will think that some other aspect is used or vice-versa

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions