Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL] Optimize handling of compile-time properties #15492

Commits on Sep 24, 2024

  1. [SYCL] Optimize handling of compile-time properties

    We perform correctness check of compile-time properties in
    `handler::processProperties` helper function. That function was
    specialized by kernel name, meaning that if we have two kernels with
    absolutely the same properties applied to them there will be two
    instantiations of `processProperties`. That consumes compilation time
    for both front-end which has to emit extra isntantiations and for host
    compilation pass which gets more functions (with the same body!) to
    handle.
    
    The only use of kernel name within `processProperties` is to check if
    that kernel is a ESIMD kernel. That can be done at caller side and
    propagated to `processProperties` as a simple boolean, thus reducing
    amount of instantiations of that function.
    
    This patch does exactly that.
    
    Please note that this is technically a *functional* change: even though
    we still process the properties in the same way, we will now emit
    diagnostics in a slightly different manner: if there are two kernels
    with the same set of illegal properties there will be only one
    diagnostic for the first kernel.
    Once that first kernel is fixed, the diagnostic will be displayed for
    the second kernel, i.e. we won't display _all_ violations in a single
    compilation run.
    
    It seems like we only have one test which exposes that behavior and
    considering that with C++ it is almost always you should fix the first
    error first to see what happens to the rest, I don't think that such
    change in diagnostics is bad enough to outweight potential (even if they
    are the slightest) compilation time improvements.
    AlexeySachkov committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    9ad21e1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2cf3a3b View commit details
    Browse the repository at this point in the history