CHIP-SPV / chipStar

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

Fix 887 #888

Closed pvelesko closed 4 months ago

pvelesko commented 4 months ago

Once main thread exists main(), all HIP calls should have already been completed. It is up to the user to make sure that happens. When does doesn't happen, we should handle such case gracefully.

Every HIP API call starts with CHIPInitialize. Check if backend has already been destroyed and if so, return error. Fixes https://github.com/CHIP-SPV/chipStar/issues/887