Skip to content

Conversation

@AlexeySachkov
Copy link
Contributor

There are E2E tests which are essentially testing the correctness of ONEAPI_DEVICE_SELECTOR env variable testing, but that can be done in way more efficient way which is unit-tests.

Note that this PR does not aim to cover ONEAPI_DEVICE_SELECTOR parsing with unit-tests in full, but rather aims to replace the most obvious candidates from E2E tests with unit-tests, providing some foundation for expanding unit-tests in follow-up PRs.

There are E2E tests which are essentially testing the correctness of
`ONEAPI_DEVICE_SELECTOR` env variable testing, but that can be done in
way more efficient way which is unit-tests.

Note that this PR does not aim to cover `ONEAPI_DEVICE_SELECTOR` parsing
with unit-tests in full, but rather aims to replace the most obvious
candidates from E2E tests with unit-tests, providing some foundation for
expanding unit-tests in follow-up PRs.
@AlexeySachkov
Copy link
Contributor Author

I had a failure in the first run of unittests on Windows, which looked like:

[ RUN      ] SchedulerTest.FailedKernelExceptionException Code: 0xC00000050x00007FF68FF43D13, D:\github\_work\llvm\llvm\build\tools\sycl\unittests\scheduler\SchedulerTests.exe(0x00007FF68FCB0000) + 0x293D13 byte(s), urEventWaitRedefineCheckEvents() + 0x223 byte(s), D:\github\_work\llvm\llvm\src\sycl\unittests\scheduler\CommandsWaitForEvents.cpp, line 53 + 0x11 byte(s)0x00007FFA7CF3EAAB, D:\github\_work\llvm\llvm\build\bin\ur_adapter_mock.dll(0x00007FFA7CF30000) + 0xEAAB byte(s), driver::urEventWait() + 0x7B byte(s), D:\github\_work\llvm\llvm\build\_deps\unified-runtime-src\source\adapters\mock\ur_mockddi.cpp, line 5100 + 0x0 byte(s)0x00007FFA7A930B0E, D:\github\_work\llvm\llvm\build\bin\UR_LOADER.dll(0x00007FFA7A900000) + 0x30B0E byte(s), urEventWait() + 0x2E byte(s), D:\github\_work\llvm\llvm\build\_deps\unified-runtime-src\source\loader\ur_libapi.cpp, line 4700 + 0x7 byte(s)0x00007FF68FE5B812, D:\github\_work\llvm\llvm\build\tools\sycl\unittests\scheduler\SchedulerTests.exe(0x00007FF68FCB0000) + 0x1AB812 byte(s), sycl::_V1::detail::waitForEvents() + 0x102 byte(s), D:\github\_work\llvm\llvm\src\sycl\source\detail\memory_manager.cpp, line 131 + 0x1E byte(s)0x00007FF68FE5B3AA, D:\github\_work\llvm\llvm\build\tools\sycl\unittests\scheduler\SchedulerTests.exe(0x00007FF68FCB0000) + 0x1AB3AA byte(s), sycl::_V1::detail::MemoryManager::release() + 0x2A byte(s), D:\github\_work\llvm\llvm\src\sycl\source\detail\memory_manager.cpp, line 260 + 0x0 byte(s)0x00007FF68FEC329A, D:\github\_work\llvm\llvm\build\tools\sycl\unittests\scheduler\SchedulerTests.exe(0x00007FF68FCB0000) + 0x21329A byte(s), sycl::_V1::detail::ReleaseCommand::enqueueImp() + 0x4FA byte(s), D:\github\_work\llvm\llvm\src\sycl\source\detail\scheduler\commands.cpp, line 1315 + 0x0 byte(s)0x00007FF68FEC1831, D:\github\_work\llvm\llvm\build\tools\sycl\unittests\scheduler\SchedulerTests.exe(0x00007FF68FCB0000) + 0x211831 byte(s), sycl::_V1::detail::Command::enqueue() + 0x3E1 byte(s), D:\github\_work\llvm\llvm\src\sycl\source\detail\scheduler\commands.cpp, line 930 + 0x0 byte(s)0x00007FF68FED6B22, D:\github\_work\llvm\llvm\build\tools\sycl\unittests\scheduler\SchedulerTests.exe(0x00007FF68FCB0000) + 0x226B22 byte(s), sycl::_V1::detail::Scheduler::GraphProcessor::enqueueCommand() + 0x172 byte(s), D:\github\_work\llvm\llvm\src\sycl\source\detail\scheduler\graph_processor.cpp, line 123 + 0x0 byte(s)0x00007FF68FED67C6, D:\github\_work\llvm\llvm\build\tools\sycl\unittests\scheduler\SchedulerTests.exe(0x00007FF68FCB0000) + 0x2267C6 byte(s), sycl::_V1::detail::Scheduler::waitForRecordToFinish() + 0x526 byte(s), D:\github\_work\llvm\llvm\src\sycl\source\detail\scheduler\scheduler.cpp, line 84 + 0x0 byte(s)0x00007FF68FED5D63, D:\github\_work\llvm\llvm\build\tools\sycl\unittests\scheduler\SchedulerTests.exe(0x00007FF68FCB0000) + 0x225D63 byte(s), sycl::_V1::detail::Scheduler::removeMemoryObject() + 0x1F3 byte(s), D:\github\_work\llvm\llvm\src\sycl\source\detail\scheduler\scheduler.cpp, line 281 + 0x13 byte(s)0x00007FF68FED4FFE, D:\github\_work\llvm\llvm\build\tools\sycl\unittests\scheduler\SchedulerTests.exe(0x00007FF68FCB0000) + 0x224FFE byte(s), sycl::_V1::detail::Scheduler::cleanupDeferredMemObjects() + 0x34E byte(s), D:\github\_work\llvm\llvm\src\sycl\source\detail\scheduler\scheduler.cpp, line 522 + 0xE byte(s)0x00007FF68FED4A53, D:\github\_work\llvm\llvm\build\tools\sycl\unittests\scheduler\SchedulerTests.exe(0x00007FF68FCB0000) + 0x224A53 byte(s), sycl::_V1::detail::Scheduler::cleanupCommands() + 0x33 byte(s), D:\github\_work\llvm\llvm\src\sycl\source\detail\scheduler\scheduler.cpp, line 412 + 0x0 byte(s)0x00007FF68FED2567, D:\github\_work\llvm\llvm\build\tools\sycl\unittests\scheduler\SchedulerTests.exe(0x00007FF68FCB0000) + 0x222567 byte(s), sycl::_V1::detail::Scheduler::NotifyHostTaskCompletion() + 0x3A7 byte(s), D:\github\_work\llvm\llvm\src\sycl\source\detail\scheduler\scheduler.cpp, line 471 + 0xD byte(s)0x00007FF68FEBAB16, D:\github\_work\llvm\llvm\build\tools\sycl\unittests\scheduler\SchedulerTests.exe(0x00007FF68FCB0000) + 0x20AB16 byte(s), sycl::_V1::detail::DispatchHostTask::operator()() + 0x8C6 byte(s), D:\github\_work\llvm\llvm\src\sycl\source\detail\scheduler\commands.cpp, line 491 + 0x10 byte(s)0x00007FF68FE18476, D:\github\_work\llvm\llvm\build\tools\sycl\unittests\scheduler\SchedulerTests.exe(0x00007FF68FCB0000) + 0x168476 byte(s), sycl::_V1::detail::ThreadPool::worker() + 0x1A6 byte(s), D:\github\_work\llvm\llvm\src\sycl\source\detail\thread_pool.hpp, line 51 + 0x0 byte(s)0x00007FF68FE13291, D:\github\_work\llvm\llvm\build\tools\sycl\unittests\scheduler\SchedulerTests.exe(0x00007FF68FCB0000) + 0x163291 byte(s), std::thread::_Invoke<std::tuple<`sycl::_V1::detail::ThreadPool::start'::`3'::<lambda_1> >,0>() + 0x11 byte(s), C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\include\thread, line 56 + 0x0 byte(s)0x00007FFAA0826B4C, C:\WINDOWS\System32\ucrtbase.dll(0x00007FFAA0800000) + 0x26B4C byte(s), _recalloc() + 0x5C byte(s)0x00007FFAA2D04CB0, C:\WINDOWS\System32\KERNEL32.DLL(0x00007FFAA2CF0000) + 0x14CB0 byte(s), BaseThreadInitThunk() + 0x10 byte(s)0x00007FFAA32FE8AB, C:\WINDOWS\SYSTEM32\ntdll.dll(0x00007FFAA3280000) + 0x7E8AB byte(s), RtlUserThreadStart() + 0x2B byte(s)Access violation

I'm sure that it couldn't be caused by changes in the PR, I wasn't able to reproduce it locally and it passed on the restart.

I will cancel remaining Windows E2E tests job, because those tests shouldn't be affected by the PR and they passed in the first run, logs here.

With that said, pre-commit seems to be passing for the PR and I will proceed with merge

@AlexeySachkov AlexeySachkov merged commit de3a1db into intel:sycl Oct 21, 2024
12 of 13 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.

2 participants