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

Added a test that retrieved DPCPP compiled kernel and submits them via DPCTLQueue_SubmitRange #499

Merged
merged 4 commits into from
Jul 7, 2021

Conversation

oleksandr-pavlyk
Copy link
Collaborator

This does not presently work with coverage turned on due to LLVM version discrepancy between IGC and DPC++.

So the test is excluded for the build with coverage.

@coveralls
Copy link
Collaborator

coveralls commented Jun 25, 2021

Coverage Status

Coverage increased (+1.2%) to 64.548% when pulling 0423551 on use-dpcpp-built-kernels into 521d277 on master.

@oleksandr-pavlyk oleksandr-pavlyk force-pushed the use-dpcpp-built-kernels branch from dbab823 to d3cc5a4 Compare June 26, 2021 23:16
@oleksandr-pavlyk
Copy link
Collaborator Author

Even though, logically, the sycl::kernel produced by dpcpp_kernel::get_fill_kernel has been given all the arguments that command group function object lambda would capture by reference, removing those from DPCTLQueue_SubmitRange results in an incorrect result (test fails).

Thus, duplicating these captured values via set_args appears needed. Perhaps this is to be expected, as the captured values are captured on the host side and must still be sent over to the device.

…ernel

test_sycl_queue_submit.cpp uses dpcpp_kernel to get kernels and submit them
using DPCTLQueue_SubmitRange, and  _SubmitNDRange in the future.

This does not work with coverage turned off due to LLVM version incompatibility
between IGC and DPCPP.
@oleksandr-pavlyk oleksandr-pavlyk force-pushed the use-dpcpp-built-kernels branch from d3cc5a4 to cf05f16 Compare June 27, 2021 16:50
Added tests for TestQueueSubmitNDRange
@oleksandr-pavlyk
Copy link
Collaborator Author

@diptorupd I have added tests for DCPTLQueue_SubmitNDRange. Expanded tests for int, unsigned int, float and double.

@oleksandr-pavlyk
Copy link
Collaborator Author

To fix the "generate-coverage" workflow it sufficies to remove linking to dpcpp_kernels static library.

The error is

[100%] Linking CXX executable dpctl_c_api_tests
error: Linking COMDATs named '__profd_dpcpp_kernels.cpp__ZN7__spirvL16initGlobalOffsetILi1EN2cl4sycl2idILi1EEEEET0_v': noduplicates has been violated!
dpcpp: error: sycl-link command failed with exit code 1 (use -v to see invocation)

@diptorupd Is there another way to fix it?

Only include dpcpp_kernels.hpp for non-coverage.
Only build dpcpp_kernel for non-coverage, and only link it to dpctl_c_api_tests in this case
@oleksandr-pavlyk
Copy link
Collaborator Author

Failures on Linux are due to OpenCL runtime packages being unavailable on PyPI due to limitation on the size of published packages.

So this can be merged.

Copy link
Contributor

@diptorupd diptorupd left a comment

Choose a reason for hiding this comment

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

Merging to master as TeamCity CI fails due to dpcpp_cpp_rt package not being there on pypi.

@diptorupd diptorupd merged commit 8c099d8 into master Jul 7, 2021
@diptorupd diptorupd deleted the use-dpcpp-built-kernels branch July 7, 2021 15:51
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.

3 participants