Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: context creation in zeIPCEventTests group
Running affected tests: `$ ./test_ipc --gtest_filter="*zeIPCEventTests.GivenTwoProcessesWhenEvent*"` The affected tests use two processes to exercise the IPC features: * the parent process creates an event-pool and sends all needed handlers to the child process via socket * the child, in turn, uses the received data to open the same event-pool and then use it. When the parent _creates_ the event-pool, the list of associated devices is passed as an argument to `zeEventPoolCreate()`. On the other hand, when the child later _opens_ the same event-pool, the `zeEventPoolOpenIpcHandle()` does not accept any list of devices to specify. Instead, under the hood, the list of devices is derived from the `context` instance. In addition to that: 1) With the current implementation the context is created using `zeContextCreate()` and then the `context` instance in the child process is associated with the root-device (instead of its subdevice[0]!). 2) Also, in NEO the method `DeviceImp::isImplicitScalingCapable()` returns `true` for root-device and `false` for a subdevice. The method `DeviceImp::isImplicitScalingCapable()` is used by both the parent process (`EventPool::initialize()`) and the child process (`EventPool::openEventPoolIpcHandle()`) and the different values returned (the latter derives devices from context, see above) cause different results computed by `DeviceImp::getEventMaxPacketCount()`. This, eventually, leads to an error when opening the event-pool because a following check for computed and expected parameter equality fails: `if (eventPool->getEventMaxPackets() != poolData.maxEventPackets) {...}` Fix the problem in child process by using `zeContextCreateEx()`, which accepts additional parameters - the list of devices (here, a subdevice[0] only) a context should be associated with. Related-To: NEO-9837 Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
- Loading branch information