oneapi-src / level-zero

oneAPI Level Zero Specification Headers and Loader
https://spec.oneapi.com/versions/latest/elements/l0/source/index.html
MIT License
208 stars 90 forks source link

Prevent reinit when zes/ze handles have already been retrieved #192

Closed nrspruit closed 2 weeks ago

nrspruit commented 2 weeks ago
nrspruit commented 2 weeks ago

why is the program instrumentation check not needed anymore?

It is replaced with the zeInuse check.

The problem with instrumentation was the calls to L0 apis during zeinit().

With the new zeInuse, calls to zeDriverGet while in the driver_check will show up and when ze has already started to be used.

so, this fix includes the support for handling program instrumentation cases.