CHIP-SPV / chipStar

chipStar is a tool for compiling and running HIP/CUDA on SPIR-V via OpenCL or Level Zero APIs.
Other
219 stars 32 forks source link

Level Zero Refactor + Bugfixes #817

Closed pvelesko closed 6 months ago

pvelesko commented 6 months ago
Refactor Level Zero

* Refactor addDependenciesQueueSync
  - Returns a std::pair of events to sync with and a locked mutexes
* Return more things by reference
* Refactor mutexes
  - Add QueueAddRemoveMtx
  - Add GlobalLastEventMtx
  - Fix getOrCreateModule race condition causing segfaults
* Refactor CHIPQueueLevel0::recordEvent
  - Fix bugs causing events being reported as not ready
* Refactor CHIPQueueLevel0::createCallbackData
  - Fix bugs causing deadlocks
  - Simplify implementation
* Drop Separate testing of regular command lists
  - Since we use both regular and immediate command lists, and since using the regular  command lists as the default execution path is less efficient than using immediate command lists, drop the testing. Subsequent PR will remove `CHIP_L0_IMM_CMD_LISTS` option.