Skip to content

[SYCL] Add size_type, to accessor and local_accessor classes. #8379

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
merged 20 commits into from
Mar 7, 2023

Conversation

mmoadeli
Copy link
Contributor

@mmoadeli mmoadeli commented Feb 16, 2023

  • Add size_type to accessor and local_accessor classes.

@mmoadeli mmoadeli requested a review from a team as a code owner February 16, 2023 16:41
@mmoadeli mmoadeli marked this pull request as draft February 16, 2023 16:48
@mmoadeli mmoadeli changed the title [SYCL] Add size_type, value_type, reference and const_reference to host_accessor. [SYCL] Add size_type, to accessor, host_accessor, local_accessor classes. Feb 16, 2023
@mmoadeli mmoadeli marked this pull request as ready for review February 16, 2023 17:02
@mmoadeli mmoadeli temporarily deployed to aws February 16, 2023 17:22 — with GitHub Actions Inactive
@mmoadeli mmoadeli temporarily deployed to aws February 16, 2023 17:57 — with GitHub Actions Inactive
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.

Could you please add a small in-tree LIT test making sure size_type is available for the various accessors and that it is the right type?

@mmoadeli
Copy link
Contributor Author

Could you please add a small in-tree LIT test making sure size_type is available for the various accessors and that it is the right type?

Thanks @steffenlarsen , done.

@mmoadeli mmoadeli temporarily deployed to aws February 18, 2023 00:55 — with GitHub Actions Inactive
@bader
Copy link
Contributor

bader commented Feb 18, 2023

@mmoadeli, OpenCL CPU and ESIMD emulator results were invalid due to infrastructure issue. I'll restart the pre-commit to get relevant results as soon as possible. No actions from your side are required. Sorry for inconvenience.

@mmoadeli mmoadeli temporarily deployed to aws February 18, 2023 02:41 — with GitHub Actions Inactive
@mmoadeli mmoadeli temporarily deployed to aws February 18, 2023 03:06 — with GitHub Actions Inactive
@mmoadeli mmoadeli changed the title [SYCL] Add size_type, to accessor, host_accessor, local_accessor classes. [SYCL] Add size_type, to accessor and local_accessor classes. Feb 20, 2023
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!

@mmoadeli mmoadeli temporarily deployed to aws February 21, 2023 05:50 — with GitHub Actions Inactive
@mmoadeli mmoadeli temporarily deployed to aws February 21, 2023 10:09 — with GitHub Actions Inactive
@mmoadeli mmoadeli temporarily deployed to aws February 21, 2023 17:43 — with GitHub Actions Inactive
@mmoadeli mmoadeli temporarily deployed to aws February 21, 2023 18:19 — with GitHub Actions Inactive
@bader
Copy link
Contributor

bader commented Feb 21, 2023

Shouldn't we use C++ type (i.e. std::size_t) instead of C type (i.e. size_t)?

@mmoadeli
Copy link
Contributor Author

Shouldn't we use C++ type (i.e. std::size_t) instead of C type (i.e. size_t)?

Specification Interface for buffer command accessors defines it as size_t.

@bader
Copy link
Contributor

bader commented Feb 22, 2023

Shouldn't we use C++ type (i.e. std::size_t) instead of C type (i.e. size_t)?

Specification Interface for buffer command accessors defines it as size_t.

Okay. Let me forward this question to @intel/dpcpp-specification-reviewers.

@gmlueck
Copy link
Contributor

gmlueck commented Feb 22, 2023

Shouldn't we use C++ type (i.e. std::size_t) instead of C type (i.e. size_t)?

Specification Interface for buffer command accessors defines it as size_t.

I agree that the SYCL spec should use the std namespace when referring to size_t, and I opened an issue for this:

https://gitlab.khronos.org/sycl/Specification/-/issues/648

It would be better to use std::size_t in the CTS also.

FWIW, all C++ compilers that I know of recognize size_t (without namespace) as an alias to std::size_t even though the C++ spec does not guarantee this.

@mmoadeli mmoadeli temporarily deployed to aws March 7, 2023 15:14 — with GitHub Actions Inactive
@mmoadeli mmoadeli temporarily deployed to aws March 7, 2023 17:17 — with GitHub Actions Inactive
@AlexeySachkov
Copy link
Contributor

********************
Unresolved Tests (1):
  SYCL :: AsyncHandler/default_async_handler.cpp

********************
Timed Out Tests (4):

3 warning(s) in tests
  SYCL :: KernelAndProgram/spec_constants_after_link.cpp
  SYCL :: Regression/kernel_bundle_ignore_sycl_external.cpp
  SYCL :: Regression/same_unnamed_kernels.cpp
  SYCL :: Regression/static-buffer-dtor.cpp

Last 4 tests were disabled on HIP in intel/llvm-test-suite#1639, async_handler is reported in #8555

@AlexeySachkov AlexeySachkov merged commit 0a17e16 into intel:sycl Mar 7, 2023
@mmoadeli mmoadeli deleted the add-size-type branch July 7, 2023 10:42
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.

Type size_type is not defined in class sycl::host_accessor
5 participants