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] Use static address space cast for atomic_ref ctor in SPIR-V path #15384

Merged
merged 11 commits into from
Sep 18, 2024

Commits on Sep 12, 2024

  1. Configuration menu
    Copy the full SHA
    0e5d540 View commit details
    Browse the repository at this point in the history
  2. [SYCL] Use static address space cast for atomic_ref ctor in SPIR-…

    …V path
    
    From SYCL 2020 specification:
    
    > The sycl::atomic_ref class also has a template parameter AddressSpace,
    > which allows the application to make an assertion about the address
    > space of the object of type T that it references. The default value
    > for this parameter is access::address_space::generic_space, which
    > indicates that the object could be in either the global or local
    > address spaces. If the application knows the address space, it can set
    > this template parameter to either access::address_space::global_space
    > or access::address_space::local_space as an assertion to the
    > implementation. Specifying the address space via this template
    > parameter may allow the implementation to perform certain
    > optimizations. Specifying an address space that does not match the
    > object’s actual address space results in undefined behavior
    
    We use `ext::oneapi::experimental::static_address_cast` to do that. It's
    not implemented for CUDA/HIP yet, that path continues using
    `sycl::address_space_cast` that performs runtime checks:
    
    > An implementation must return nullptr if the run-time value of pointer
    > is not compatible with Space, and must issue a compiletime diagnostic
    > if the deduced address space for pointer is not compatible with Space.
    aelovikov-intel committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    a22d4bd View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2024

  1. Configuration menu
    Copy the full SHA
    21c3f33 View commit details
    Browse the repository at this point in the history
  2. [SYCL] Fix static|dynamic_address_cast to generic

    SPIRV operations are defined such that `OpGenericCastToPtr` and
    `OpGenericCastToPtrExplicit` cannot be used when target `Storage Class`
    is `Generic`, yet we were generating such code. This PR fixes that.
    aelovikov-intel committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    7d4af87 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b30b1c4 View commit details
    Browse the repository at this point in the history
  4. clang-format

    aelovikov-intel committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    d40110d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f052b05 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    78cde19 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2024

  1. Configuration menu
    Copy the full SHA
    fd7848b View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2024

  1. Configuration menu
    Copy the full SHA
    d62ab6d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    56e8f2f View commit details
    Browse the repository at this point in the history