Skip to content

[SYCL][E2E] Add local_accessor and accessor tests for sycl_ext_oneapi_free_function_kernels extension #18672

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

Open
wants to merge 8 commits into
base: sycl
Choose a base branch
from

Conversation

dyniols
Copy link
Contributor

@dyniols dyniols commented May 26, 2025

This PR adds new e2e tests for free function kernels extension based on test plan https://github.com/intel/llvm/blob/sycl/sycl/test-e2e/FreeFunctionKernels/test-plan.md

@dyniols dyniols temporarily deployed to WindowsCILock May 26, 2025 15:13 — with GitHub Actions Inactive
@dyniols dyniols temporarily deployed to WindowsCILock May 26, 2025 15:51 — with GitHub Actions Inactive
@dyniols dyniols temporarily deployed to WindowsCILock May 26, 2025 15:51 — with GitHub Actions Inactive
@dyniols dyniols changed the title [SYCL][E2E] Add new tests for sycl_ext_oneapi_free_function_kernels extension [SYCL][E2E] Add local_accessor and accessor e2e tests for sycl_ext_oneapi_free_function_kernels extension May 30, 2025
@dyniols dyniols marked this pull request as ready for review May 30, 2025 09:07
@dyniols dyniols requested a review from a team as a code owner May 30, 2025 09:07
@dyniols dyniols requested a review from aelovikov-intel May 30, 2025 09:07
@dyniols
Copy link
Contributor Author

dyniols commented May 30, 2025

Closing PR and enabling it back again to rerun CI

@dyniols dyniols closed this May 30, 2025
@dyniols dyniols reopened this May 30, 2025
@dyniols dyniols temporarily deployed to WindowsCILock May 30, 2025 09:08 — with GitHub Actions Inactive
@dyniols dyniols changed the title [SYCL][E2E] Add local_accessor and accessor e2e tests for sycl_ext_oneapi_free_function_kernels extension [SYCL][E2E] Add local_accessor and accessor tests for sycl_ext_oneapi_free_function_kernels extension May 30, 2025
@dyniols dyniols temporarily deployed to WindowsCILock May 30, 2025 09:29 — with GitHub Actions Inactive
@dyniols dyniols temporarily deployed to WindowsCILock May 30, 2025 09:29 — with GitHub Actions Inactive
@aelovikov-intel
Copy link
Contributor

It would we much more effective if someone already familiar with the test plan would be reviewing this.

#include "helpers.hpp"

SYCL_EXT_ONEAPI_FUNCTION_PROPERTY((syclexp::single_task_kernel))
void globalScopeSingleFreeFunc(sycl::accessor<int, 1> Accessor,
Copy link
Contributor

Choose a reason for hiding this comment

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

can we also test an accessor with Dim 2 and 3 ? Because of the way they are lowered we've had problems before that were similarly undetected because we were only testing Dim==1 .

Copy link
Contributor Author

@dyniols dyniols May 30, 2025

Choose a reason for hiding this comment

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

Sure, I will add checks to the test for accessor with Dim 2 and 3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I may be wrong, but it seems to me like Chris wanted approximately the same test case but with different dimensionality. Could we make it a templated function and adapt the test cases to run for each dimension?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, it can be done.

@dyniols dyniols temporarily deployed to WindowsCILock June 2, 2025 12:08 — with GitHub Actions Inactive
@dyniols dyniols temporarily deployed to WindowsCILock June 2, 2025 12:29 — with GitHub Actions Inactive
@dyniols dyniols temporarily deployed to WindowsCILock June 2, 2025 12:29 — with GitHub Actions Inactive
@dyniols dyniols requested a review from cperkinsintel June 2, 2025 12:38
@dyniols dyniols requested a review from steffenlarsen June 2, 2025 12:38
@dyniols dyniols temporarily deployed to WindowsCILock June 2, 2025 12:58 — with GitHub Actions Inactive
@dyniols dyniols temporarily deployed to WindowsCILock June 2, 2025 13:19 — with GitHub Actions Inactive
@dyniols dyniols temporarily deployed to WindowsCILock June 2, 2025 13:19 — with GitHub Actions Inactive
sycl::nd_item<2> NdItem = syclext::this_work_item::get_nd_item<2>();
Accessor[NdItem.get_group_linear_id()][NdItem.get_local_linear_id()] = Value;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also add a test that involves multiple accessor parameters?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure 👍

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.

5 participants