CHIP-SPV / chipStar

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

Skipping uninit via CHIP_SKIP_UNINIT results in various segfaults #749

Closed pvelesko closed 2 weeks ago

pvelesko commented 7 months ago
The following tests FAILED:
    671 - Unit_hipMemsetFunctional_ZeroSize_3D (SEGFAULT)
    826 - Unit_hipStreamPerThread_MultiThread (SEGFAULT)
    827 - Unit_hipStreamPerThread_DeviceReset_1 (SEGFAULT)
    837 - Unit_hipClassKernel_Friend (SEGFAULT)
    854 - sincospifSpotTest (SEGFAULT)
    858 - syncthreadsExitedThreads (SEGFAULT)
    894 - TestRecordEventBlocking (SEGFAULT)
    909 - TestForgottenModuleUnload (Failed)
pvelesko commented 3 months ago

Is CHIP_SKIP_UNINIT still needed? @linehill

linehill commented 3 months ago

Considering the reason it was added for (from chipStar_1.1.rst):

certain combinations of drivers, hardware and OpenCL backend causes
chipStar to crash at exit. As a workaround, the user can set the CHIP_SKIP_UNINIT 
env variable to skip the uninitialization of the chipStar library.

Seems like we might still need it.

pvelesko commented 3 months ago

I think you added this options @franz do you remember which platform needed it?

franz commented 3 months ago

Yeah it was PVC with particular OpenCL driver versions. IIRC unfortunately it was the older drivers that worked and newer drivers that crashed. But i haven't tested on PVC in a few months so maybe it's fixed now.

pvelesko commented 2 weeks ago

Skipping uninitialization doens't seem to be needed on any of the systems that I've tested.