Skip to content

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.

This comment was marked as outdated.

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

# 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
dm-vodopyanov added a commit to dm-vodopyanov/llvm that referenced this pull request Nov 3, 2025
This patch fixes a regression happened after
intel#19687:
`check-all` lost the entire SYCL-Unit test suite, so SYCL unit tests did
not run for `check-all` target.
dm-vodopyanov added a commit that referenced this pull request Nov 6, 2025
This patch fixes a regression happened after
#19687:
`check-all` lost the entire SYCL-Unit test suite, so SYCL unit tests did
not run for `check-all` target.
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.

5 participants