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][Graph] Add support for fill and memset nodes in graphs #11472

Merged
merged 30 commits into from
Jan 11, 2024

Conversation

Bensuo
Copy link
Contributor

@Bensuo Bensuo commented Oct 9, 2023

  • Adds support for fill and memset nodes in graphs.
  • Supported on Level Zero only for now.
  • Adds E2E and unit tests for these new node types.
  • Minor modifications due to renaming of some UR functions.

@Bensuo Bensuo temporarily deployed to WindowsCILock October 9, 2023 15:41 — with GitHub Actions Inactive
@Bensuo Bensuo temporarily deployed to WindowsCILock October 9, 2023 16:08 — with GitHub Actions Inactive
@al42and
Copy link
Contributor

al42and commented Oct 26, 2023

May I ask when this change and the associated UR PR are expected to be merged?

@Bensuo
Copy link
Contributor Author

Bensuo commented Oct 26, 2023

May I ask when this change and the associated UR PR are expected to be merged?

As far as I'm aware there isn't a clear timeline for merging the associated UR PR right now unfortunately, due to the adapter move still being in progress. Since these changes involve updates to the UR specification for command buffers it may be delayed until all adapters have been moved and the adapters branch is retired in favour using of the main branch again.

@al42and
Copy link
Contributor

al42and commented Oct 27, 2023

BTW, is it the expected behavior that

q.submit((sycl::handler & cgh) { cgh.memset(ptr_, 0, size_); });

does not work without this PR, but

q.memset(ptr_, 0, size_);

works fine in a graph on LevelZero devices with the current sycl branch (at least in a very simple test)?

sycl/test-e2e/Graph/Explicit/usm_memset.cpp Outdated Show resolved Hide resolved
sycl/test-e2e/Graph/RecordReplay/usm_memset.cpp Outdated Show resolved Hide resolved
sycl/doc/design/CommandGraph.md Show resolved Hide resolved
sycl/plugins/opencl/pi_opencl.cpp Outdated Show resolved Hide resolved
sycl/doc/design/CommandGraph.md Outdated Show resolved Hide resolved
sycl/test-e2e/Graph/Explicit/buffer_fill.cpp Outdated Show resolved Hide resolved
sycl/test-e2e/Graph/Explicit/usm_memset.cpp Outdated Show resolved Hide resolved
sycl/test-e2e/Graph/RecordReplay/buffer_fill.cpp Outdated Show resolved Hide resolved
sycl/test-e2e/Graph/RecordReplay/usm_memset.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@kbenzie kbenzie left a comment

Choose a reason for hiding this comment

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

UR LGTM

@EwanC
Copy link
Contributor

EwanC commented Jan 10, 2024

Thanks for the review @aelovikov-intel, I think I've addressed all your comments if you could take another look.

@EwanC
Copy link
Contributor

EwanC commented Jan 10, 2024

ping @intel/llvm-reviewers-cuda for review

Copy link
Contributor

@jchlanda jchlanda left a comment

Choose a reason for hiding this comment

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

CUDA/HIP 👍

@EwanC
Copy link
Contributor

EwanC commented Jan 11, 2024

@intel/llvm-gatekeepers Can you merge this please

@steffenlarsen steffenlarsen merged commit 8ea0229 into intel:sycl Jan 11, 2024
12 checks passed
@EwanC
Copy link
Contributor

EwanC commented Jan 11, 2024

This PR broke post-commit CI due to an unused variable, I'll look into it - #12362

EwanC added a commit to reble/llvm that referenced this pull request Jan 11, 2024
Ignore unused `Size` parameter from
`memory_manager::ext_oneapi_fill_cmd_buffer`.

This was introduced in PR intel#11472
and passed as `Req->MMemoryRange` from the command-group requirement
but not used for calling the underlying UR function, leading to a
`-Wunused-parameter` error.

It may be that this is needed to support buffers of dimension greater
than 1, which there are currently no graphs tests for. This will
be investigated as a follow-up once post-commit CI is unblocked
with this PR.
aelovikov-intel pushed a commit that referenced this pull request Jan 11, 2024
Ignore unused `Size` parameter from
`memory_manager::ext_oneapi_fill_cmd_buffer`.

This was introduced in PR #11472 and
passed as `Req->MMemoryRange` from the command-group requirement but not
used for calling the underlying UR function, leading to a
`-Wunused-parameter` error.

It may be that this is needed to support buffers of dimension greater
than 1, which there are currently no graphs tests for. This will be
investigated as a follow-up once post-commit CI is unblocked with this
PR.
EwanC added a commit to reble/llvm that referenced this pull request Feb 6, 2024
The merged PR intel#11472
added support for `handler::fill` and `handler::memset`
nodes in a graph, while merged PR
intel#11474 added support
for `handler::prefetch` and `handler::mem_advise`.
AlexeySachkov pushed a commit that referenced this pull request Feb 7, 2024
The merged PR #11472 added support for
`handler::fill` and `handler::memset` nodes in a graph, while merged PR
#11474 added support for
`handler::prefetch` and `handler::mem_advise`. Remove mentions of these
as limitations from the specification, as they are now supported.
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.

8 participants