Skip to content

[CI][SYCL][Test] Make check-sycl-unittests also run unit tests with ABI breaking changes. #19687

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 13 commits into from
Aug 6, 2025

Conversation

uditagarwal97
Copy link
Contributor

@uditagarwal97 uditagarwal97 commented Aug 1, 2025

This PR makes check-sycl-unittests CMake target run both preview and non-preview version of unit tests.

Copilot

This comment was marked as outdated.

@uditagarwal97 uditagarwal97 marked this pull request as ready for review August 4, 2025 23:30
@uditagarwal97 uditagarwal97 requested review from a team as code owners August 4, 2025 23:30
@uditagarwal97 uditagarwal97 requested a review from reble August 4, 2025 23:30
Copy link
Contributor

@sarnex sarnex left a comment

Choose a reason for hiding this comment

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

cmake lgtm


if(WIN32)
# Windows doesn't support LD_LIBRARY_PATH, so instead we copy the mock OpenCL binary next to the test and ensure
# that the test itself links to OpenCL (rather than through ur_adapter_opencl.dll)
set(mock_ocl ${CMAKE_CURRENT_BINARY_DIR}/OpenCL.dll)

# An error is thrown if both the preview and non-preview versions try to
Copy link
Contributor

Choose a reason for hiding this comment

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

unrelated but do we really need to copy the opencl library to the test dir?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so. Before my changes, there was a comment (https://github.com/intel/llvm/blob/sycl/sycl/cmake/modules/AddSYCLUnitTest.cmake#L79) saying:

# Windows doesn't support LD_LIBRARY_PATH, so instead we copy the mock OpenCL binary next to the test and ensure
# that the test itself links to OpenCL (rather than through ur_adapter_opencl.dll)

@sarnex sarnex requested a review from a team August 4, 2025 23:59
Comment on lines 248 to 253
- name: check-sycl-unittests-preview
if: always() && !cancelled() && contains(inputs.changes, 'sycl')
run: |
# TODO consider moving this to Dockerfile.
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
cmake --build $GITHUB_WORKSPACE/build --target check-sycl-unittests-preview
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO, existing target should just check both.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean that check-sycl-unittests should check both preview and non-preview?
OR
Was you comment specific to the CI job, like a single job for both preview and non-preview unittest run?

Copy link
Contributor

Choose a reason for hiding this comment

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

check-sycl-unittests should check both preview and non-preview.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 22d66d0

@uditagarwal97 uditagarwal97 changed the title [CI][SYCL][Test] Add CMake target for running SYCL unit tests with ABI breaking changes enabled [CI][SYCL][Test] Make check-sycl-unittests also run unit tests with ABI breaking changes. Aug 6, 2025
endif()
endif()

# This is done to ensure that preview tests are kept in a seperate
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# This is done to ensure that preview tests are kept in a seperate
# This is done to ensure that preview tests are kept in a separate

@uditagarwal97 uditagarwal97 merged commit 2443f54 into sycl Aug 6, 2025
51 of 53 checks passed
@uditagarwal97 uditagarwal97 deleted the private/udit/preview_unittest branch August 6, 2025 21:24
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