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

Add USM shared and device memory to unit testing #388

Closed

Conversation

SergeyKopienko
Copy link
Contributor

@SergeyKopienko SergeyKopienko commented Oct 21, 2021

Added USM shared and device memory to unit testing:

  • implementer new class sycl_usm_helper:
    • USM shared/device memory allocation;
    • copy host data into USM shared/device memory;
    • retrieve data from USM shared/device memory to host data;
    • deallocate USM shared/device memory in destructor;
  • added usage of class sycl_usm_helper in tests;
  • some functions in tests now implemented as template <sycl::usm::alloc alloc_type>:
    • for example, in main() function of zip_iterator.pass.cpp now implemented like this:
      int32_t
      main()
      {
      #if TEST_DPCPP_BACKEND_PRESENT
      // Run tests for USM shared memory
      test_buffers<sycl::usm::alloc::shared>();
      // Run tests for USM device memory
      test_buffers<sycl::usm::alloc::device>();
      #endif
      return done(TEST_DPCPP_BACKEND_PRESENT);
      }
  • added ability of usage these functions for testing of USM shared memory (by template parameter sycl::usm::alloc::shared) and USM device memory (by template parameter sycl::usm::alloc::device;

@SergeyKopienko SergeyKopienko force-pushed the dev/skopienko/add_unit_testing_for_USM_(malloc_device) branch 2 times, most recently from 4b450aa to bdb9c16 Compare October 21, 2021 11:18
@SergeyKopienko SergeyKopienko marked this pull request as ready for review October 21, 2021 12:03
@SergeyKopienko SergeyKopienko force-pushed the dev/skopienko/add_unit_testing_for_USM_(malloc_device) branch from 39a3553 to bd43651 Compare October 22, 2021 06:29
include/oneapi/dpl/internal/function.h Outdated Show resolved Hide resolved
include/oneapi/dpl/internal/function.h Outdated Show resolved Hide resolved
include/oneapi/dpl/internal/function.h Outdated Show resolved Hide resolved
test/support/sycl_alloc_utils.h Outdated Show resolved Hide resolved
test/support/sycl_alloc_utils.h Outdated Show resolved Hide resolved
test/support/sycl_alloc_utils.h Outdated Show resolved Hide resolved
test/support/sycl_alloc_utils.h Outdated Show resolved Hide resolved
test/support/sycl_alloc_utils.h Outdated Show resolved Hide resolved
@SergeyKopienko SergeyKopienko force-pushed the dev/skopienko/add_unit_testing_for_USM_(malloc_device) branch 6 times, most recently from 0f3a139 to e5a45ef Compare October 26, 2021 11:05
@SergeyKopienko SergeyKopienko force-pushed the dev/skopienko/add_unit_testing_for_USM_(malloc_device) branch 3 times, most recently from 0836d8f to b9da87f Compare December 1, 2021 15:13
@SergeyKopienko SergeyKopienko force-pushed the dev/skopienko/add_unit_testing_for_USM_(malloc_device) branch from b9da87f to b98e683 Compare December 1, 2021 16:27
@SergeyKopienko SergeyKopienko deleted the dev/skopienko/add_unit_testing_for_USM_(malloc_device) branch March 16, 2022 10:57
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.

4 participants