Skip to content

[SYCL] Adds support for atomic fence capabilities device queries #8586

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

Merged

Conversation

maarquitos14
Copy link
Contributor

Adds support to query devices for atomic_fence_order_capabilities and atomic_fence_scope_capabilities. The backends supported are OpenCL and Level Zero. For the rest of backends, it has been left unsupported.

Fixes #8293.

Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
@maarquitos14 maarquitos14 requested review from a team as code owners March 9, 2023 10:44
@maarquitos14 maarquitos14 temporarily deployed to aws March 9, 2023 10:54 — with GitHub Actions Inactive
Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
@maarquitos14 maarquitos14 temporarily deployed to aws March 9, 2023 12:21 — with GitHub Actions Inactive
@maarquitos14 maarquitos14 temporarily deployed to aws March 9, 2023 13:14 — with GitHub Actions Inactive
Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
@maarquitos14 maarquitos14 temporarily deployed to aws March 9, 2023 16:51 — with GitHub Actions Inactive
Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
@maarquitos14 maarquitos14 temporarily deployed to aws March 10, 2023 11:39 — with GitHub Actions Inactive
@maarquitos14 maarquitos14 temporarily deployed to aws March 10, 2023 13:07 — with GitHub Actions Inactive
Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
@maarquitos14 maarquitos14 temporarily deployed to aws March 10, 2023 14:30 — with GitHub Actions Inactive
@maarquitos14 maarquitos14 temporarily deployed to aws March 10, 2023 15:00 — with GitHub Actions Inactive
Copy link
Contributor

@npmiller npmiller left a comment

Choose a reason for hiding this comment

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

PI CUDA and PI HIP changes LGTM

Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
@maarquitos14 maarquitos14 temporarily deployed to aws March 13, 2023 19:01 — with GitHub Actions Inactive
@maarquitos14 maarquitos14 temporarily deployed to aws March 24, 2023 10:15 — with GitHub Actions Inactive
@maarquitos14 maarquitos14 temporarily deployed to aws March 24, 2023 10:46 — with GitHub Actions Inactive
info::device::atomic_fence_order_capabilities> {
static std::vector<memory_order> get(RT::PiDevice dev, const plugin &Plugin) {
pi_memory_order_capabilities result;
Plugin.call_nocheck<PiApiKind::piDeviceGetInfo>(
Copy link
Contributor

Choose a reason for hiding this comment

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

Why nocheck? Where do we perform error handling?

@@ -1025,13 +1051,27 @@ get_device_info_host<info::device::atomic_memory_order_capabilities>() {
memory_order::acq_rel, memory_order::seq_cst};
}

template <>
inline std::vector<memory_order>
get_device_info_host<info::device::atomic_fence_order_capabilities>() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder when we will be able to stop specializing that for host device, because it doesn't really exists anymore

Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
@maarquitos14 maarquitos14 temporarily deployed to aws March 24, 2023 14:33 — with GitHub Actions Inactive
@maarquitos14 maarquitos14 temporarily deployed to aws March 24, 2023 15:11 — with GitHub Actions Inactive
Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
@maarquitos14 maarquitos14 temporarily deployed to aws March 27, 2023 14:25 — with GitHub Actions Inactive
@maarquitos14
Copy link
Contributor Author

/testwin

@maarquitos14
Copy link
Contributor Author

/verify with intel/llvm-test-suite#1658

@maarquitos14 maarquitos14 temporarily deployed to aws March 27, 2023 15:09 — with GitHub Actions Inactive
Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
@maarquitos14 maarquitos14 temporarily deployed to aws March 27, 2023 19:47 — with GitHub Actions Inactive
@maarquitos14 maarquitos14 temporarily deployed to aws March 27, 2023 21:24 — with GitHub Actions Inactive
Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
@maarquitos14 maarquitos14 temporarily deployed to aws March 28, 2023 08:25 — with GitHub Actions Inactive
@maarquitos14
Copy link
Contributor Author

/testwin

@maarquitos14
Copy link
Contributor Author

/verify with intel/llvm-test-suite#1658

@maarquitos14
Copy link
Contributor Author

@jchlanda @npmiller Sorry to bother you again, but I had to update HIP backend again. Atomic ref tests were failing because they use some of the queries we are updating here. We initially went for reporting an error because the queries went unsupported but that was causing mentioned tests to fail. Now, I'm just returning minimum mandated capabilities specified by SYCL 2020 while we wait for a final implementation for these queries in the backend (I'll open an issue to keep track). Please, check if everything makes sense to you.

@maarquitos14 maarquitos14 temporarily deployed to aws March 28, 2023 10:54 — with GitHub Actions Inactive
@maarquitos14
Copy link
Contributor Author

Friendly ping @intel/llvm-reviewers-runtime.

Copy link
Contributor

@jandres742 jandres742 left a comment

Choose a reason for hiding this comment

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

+1 on UR/L0 related changes.

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

LGTM!

@steffenlarsen steffenlarsen merged commit 632946a into intel:sycl Mar 28, 2023
veselypeta pushed a commit to veselypeta/llvm that referenced this pull request Sep 21, 2023
…el#8586)

Adds support to query devices for `atomic_fence_order_capabilities` and
`atomic_fence_scope_capabilities`. The backends supported are OpenCL and
Level Zero. For the rest of backends, it has been left unsupported.

Fixes intel#8293.

---------

Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
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.

sycl::info::device:: atomic_fence_scope_capabilities and atomic_fence_order_capabilities are not implemented
9 participants