Skip to content

Add optional support for GPU page faults in SYCL2020 and OMP backends#217

Merged
tomdeakin merged 2 commits into
UoB-HPC:developfrom
ifdu:svm
Feb 20, 2026
Merged

Add optional support for GPU page faults in SYCL2020 and OMP backends#217
tomdeakin merged 2 commits into
UoB-HPC:developfrom
ifdu:svm

Conversation

@ifdu
Copy link
Copy Markdown
Contributor

@ifdu ifdu commented Feb 11, 2026

No description provided.

Copy link
Copy Markdown
Contributor

@tomdeakin tomdeakin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OpenMP version needs to use the requires(unified_shared_memory) directive for correctness according to the standard. Please can you update the change to use this?

I do not believe the SYCL change here is standards compliant to SYCL 2020. Please can you remove this change.

@tomdeakin tomdeakin changed the base branch from main to develop February 11, 2026 09:47
@ifdu
Copy link
Copy Markdown
Contributor Author

ifdu commented Feb 11, 2026

@tomdeakin Thanks for reviewing.

Sure, let me add that directive to the OpenMP version.

The SYCL change is an attempt to make use of [1]:

In the most capable systems, users do not need to use SYCL USM allocation functions to create shared allocations. The system allocator (malloc/new) may instead be used. Likewise, std::free and delete are used instead of sycl::free.

Would you have a recommendation to make it compliant?

[1] https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#_usm_allocations

@tomdeakin
Copy link
Copy Markdown
Contributor

Good point, thanks for reminding me of that sentence. I don't think SYCL has a way to programmatically check for system capability, so the solution you have is probably as good as we can do for now. Thanks!

Tested on Intel B580 with:

    $ cmake -Bbuild -H. \
            -DMODEL=sycl2020-usm \
            -DSYCL_COMPILER=ONEAPI-ICPX \
            -DMEM=PAGEFAULT
    $ cmake --build build
    $ NEOReadDebugKeys=1 \
      EnableSharedSystemUsmSupport=1 \
      ./build/sycl2020-usm-stream

Signed-off-by: Francois Dugast <francois.dugast@intel.com>
@ifdu
Copy link
Copy Markdown
Contributor Author

ifdu commented Feb 12, 2026

@tomdeakin This pull request is now rebased on UoB-HPC:develop and includes the OpenMP directive which was missing.

Copy link
Copy Markdown
Contributor

@tomdeakin tomdeakin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SYCL changes are fine. Just one query about the OpenMP is_device_ptr clause I added to a comment. Thanks for working through this!

Comment thread src/omp/OMPStream.cpp Outdated
Tested on Intel B580 with:

    $ cmake -Bbuild -H. \
            -DMODEL=omp \
            -DOFFLOAD=ON \
            -DCMAKE_CXX_COMPILER=icpx \
            -DCXX_EXTRA_FLAGS="-fiopenmp -fopenmp-targets=spir64" \
            -DMEM=PAGEFAULT
    $ cmake --build build
    $ NEOReadDebugKeys=1 \
      EnableSharedSystemUsmSupport=1 \
      OMP_TARGET_OFFLOAD=MANDATORY \
      ./build/omp-stream

Signed-off-by: Francois Dugast <francois.dugast@intel.com>
@ifdu
Copy link
Copy Markdown
Contributor Author

ifdu commented Feb 13, 2026

@tomdeakin I pushed a new OpenMP version without is_device_ptr, which works fine in my tests.

@tomdeakin
Copy link
Copy Markdown
Contributor

Something is causing the CI to fail vs the develop branch (https://github.com/UoB-HPC/BabelStream/actions/runs/21986408147/job/63521614186). I will try to investigate.

@ifdu
Copy link
Copy Markdown
Contributor Author

ifdu commented Feb 13, 2026

Does it come from the change or from the CI environment itself?

@tomdeakin
Copy link
Copy Markdown
Contributor

Looks like the environment.

@tomdeakin tomdeakin merged commit 1f3e8e1 into UoB-HPC:develop Feb 20, 2026
6 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants