-
Notifications
You must be signed in to change notification settings - Fork 794
[SYCL][Test] Replace multi-device kernel_bundle e2e tests with unit test #17691
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
Conversation
2cd5d37 to
d0d6751
Compare
Replace the following e2e tests with unit test: ProgramManager/multi_device_bundle~device_libs_and_caching.cpp ProgramManager/multi_device_bundle~build_twice.cpp KernelAndProgram/persistent-cache-multi-device.cpp The reason is that the checks performed in those e2e tests (number of UR calls, etc.) can be done more effificently using unit tests, such checks in e2e tests are expensive. Another reson is that e2e tests use NEO-specific CreateMultipleRootDevices=[num] environment variable which is not guaranteed to work, in unit tests we can emulate as many devices as we want.
d0d6751 to
d5495b9
Compare
|
@slawekptak @intel/llvm-reviewers-runtime Could you review please. |
slawekptak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small thing: This PR also modifies config.hpp. Could you please add a note to the description about this change and how it relates to the changes in tests?
Sorry, I've removed that part as I have realized it is excessive. Initially I have added specialization of the SYCLConfig for SYCL_DEVICELIB_NO_FALLBACK to be able to unset that config value from inside the unit test - because I want to test behavior when fallback libs are allowed. Now I've realized that there is a simpler way to do so using existing ScopedEnvVar and by passing nullptr to it (which results in unsetting the value, i.e. same desired behavior). |
itt_annotations.cpp contains two unit tests. First one was setting INTEL_ENABLE_OFFLOAD_ANNOTATIONS=1 and didn't restore original value - this is a bug, because there is no guarantee that the first and the second test from this file run in order, google test might run other tests in between. So INTEL_ENABLE_OFFLOAD_ANNOTATIONS=1 was interfering with other tests - the ones which test persistent cache, because INTEL_ENABLE_OFFLOAD_ANNOTATIONS=1 disables persistent cache. So, this commit fixes this behaviour by using scoped env var.
If we register an image with device lib extensions then files must already be available. There are some tests in ProgramManager unit test executable which create a kernel bundle withouth specifying particular kernel name, so kernels from all images (from all tests) can be used and must be functional.
Replace the following e2e tests with unit test:
The reason is that the checks performed in those e2e tests (number of UR calls, etc.) can be done more effificently using unit tests, such checks in e2e tests are expensive. Another reason is that e2e tests use NEO-specific
CreateMultipleRootDevices=[num]environment variable which is not guaranteed to work, in unit tests we can emulate as many devices as we want.