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

[SYCLomatic #1335] Add tests for device_new and device_delete #477

Conversation

mmichel11
Copy link
Contributor

@mmichel11 mmichel11 commented Sep 27, 2023

This PR adds test for dpct::device_new and dpct::device_delete and complements the fixes provided in SYCLomatic #1335. The test cases will not pass until the SYCLomatic PR is merged.

All three implementations of dpct::device_new are tested in this PR.

Signed-off-by: Matthew Michel <matthew.michel@intel.com>
Copy link
Contributor

@danhoeflinger danhoeflinger left a comment

Choose a reason for hiding this comment

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

LGTM

@tomflinda
Copy link
Contributor

tomflinda commented Oct 25, 2023

@mmichel11 CI test failed for this PR:

/***/dpct_ci/tst_pub_2/_work/SYCLomatic-test/SYCLomatic-test/c2s_test_repo/test_workspace/help_function/option_usmnone_cpu/onedpl_test_device_new_delete/onedpl_test_device_new_delete.cpp:100:47: error: call to 'device_new' is ambiguous
  100 |     dpct::device_pointer<int64_t> dev_array = dpct::device_new<int64_t>(ptr, n);
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~
/***/dpct_ci/tst_pub_2/_work/SYCLomatic-test/SYCLomatic-test/c2s.obj/include/dpct/dpl_extras/memory.h:921:19: note: candidate function [with T = long]
  921 | device_pointer<T> device_new(device_pointer<T> p, const T &value,
      |                   ^
/***/dpct_ci/tst_pub_2/_work/SYCLomatic-test/SYCLomatic-test/c2s.obj/include/dpct/dpl_extras/memory.h:928:19: note: candidate function [with T = long]
  928 | device_pointer<T> device_new(device_pointer<T> p, const std::size_t count = 1) {
      |                   ^
/***/dpct_ci/tst_pub_2/_work/SYCLomatic-test/SYCLomatic-test/c2s_test_repo/test_workspace/help_function/option_usmnone_cpu/onedpl_test_device_new_delete/onedpl_test_device_new_delete.cpp:111:9: error: no matching function for call to 'device_new'
  111 |         dpct::device_new<integer_wrapper>(ptr, n);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Pls take a look.

@mmichel11
Copy link
Contributor Author

@mmichel11 CI test failed for this PR:

/***/dpct_ci/tst_pub_2/_work/SYCLomatic-test/SYCLomatic-test/c2s_test_repo/test_workspace/help_function/option_usmnone_cpu/onedpl_test_device_new_delete/onedpl_test_device_new_delete.cpp:100:47: error: call to 'device_new' is ambiguous
  100 |     dpct::device_pointer<int64_t> dev_array = dpct::device_new<int64_t>(ptr, n);
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~
/***/dpct_ci/tst_pub_2/_work/SYCLomatic-test/SYCLomatic-test/c2s.obj/include/dpct/dpl_extras/memory.h:921:19: note: candidate function [with T = long]
  921 | device_pointer<T> device_new(device_pointer<T> p, const T &value,
      |                   ^
/***/dpct_ci/tst_pub_2/_work/SYCLomatic-test/SYCLomatic-test/c2s.obj/include/dpct/dpl_extras/memory.h:928:19: note: candidate function [with T = long]
  928 | device_pointer<T> device_new(device_pointer<T> p, const std::size_t count = 1) {
      |                   ^
/***/dpct_ci/tst_pub_2/_work/SYCLomatic-test/SYCLomatic-test/c2s_test_repo/test_workspace/help_function/option_usmnone_cpu/onedpl_test_device_new_delete/onedpl_test_device_new_delete.cpp:111:9: error: no matching function for call to 'device_new'
  111 |         dpct::device_new<integer_wrapper>(ptr, n);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Pls take a look.

I believe this is occurring because the CI was ran before the corresponding SYCLomatic PR was merged. The test is passing on my side. Could you trigger a rerun of this CI job? I do not seem to have permission to rerun CI (without making a new commit).

@mmichel11
Copy link
Contributor Author

@tomflinda I have triggered a CI rerun with an empty commit. The tests now pass since the bugfix I provided has been merged into the main SYCLomatic repo.

Copy link
Contributor

@tomflinda tomflinda left a comment

Choose a reason for hiding this comment

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

LGTM

@zhimingwang36 zhimingwang36 merged commit 57e9481 into oneapi-src:SYCLomatic Oct 30, 2023
12 checks passed
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