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

[UR][L0] Unify use of large allocation in L0 adapter #1099

Merged
merged 2 commits into from
Dec 6, 2023

Commits on Nov 28, 2023

  1. [UR][L0] Check Global Mem Size as Limit for Free Memory

    Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
    nrspruit committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    40c8da9 View commit details
    Browse the repository at this point in the history
  2. [UR][L0] Unify use of large allocation in L0 adapter

    Intel(R) GPUs have two modes of operation in terms of allocations:
    Stateful and stateless mode.
    
    Stateful optimizes memory accesses through pointer arithmetic.
    This can be done as long as allocations used by the allocation
    are smaller than 4GB.
    
    Stateless disables such pointer-arithmetic optimization to
    allow the kernel to use allocations larger than 4GB.
    
    Currently, L0 adapter dynamically and automatically requests
    the L0 driver large allocations if it detects an allocation size
    is larger than 4GB. This creates a problem if a kernel has been
    previously compiled for stateful access. This ultimately means
    the adapter mixes stateful and stateless behavior, which is not
    a user-friendly experience.
    
    This patch aims at correcting this behavior by defining a default
    one. On Intel(R) GPUs previous to Intel(R) Data Center GPU Max,
    default behavior is now stateless, meaning all allocations are
    only allowed by default. Users can opt-in for stateful mode setting
    a new environment variable UR_L0_USE_OPTIMIZED_32BIT_ACCESS=1.
    
    Addresses:
    https://stackoverflow.com/questions/75621264/sycl-dot-product-code-gives-wrong-results
    
    Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
    Jaime Arteaga committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    28590a8 View commit details
    Browse the repository at this point in the history