File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
unified-runtime/source/adapters/level_zero Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -667,15 +667,15 @@ ur_result_t urAdapterGet(
667
667
uint32_t *NumAdapters) {
668
668
if (NumEntries > 0 && Adapters) {
669
669
if (GlobalAdapter) {
670
- if (GlobalAdapter->incrementRefCount () == 0 ) {
670
+ if (GlobalAdapter->incrementRefCount () == 1 ) {
671
671
adapterStateInit ();
672
672
}
673
673
} else {
674
674
// If the GetAdapter is called after the Library began or was torndown,
675
675
// then temporarily create a new Adapter handle and register a new
676
676
// cleanup.
677
677
GlobalAdapter = new ur_adapter_handle_t_ ();
678
- if (GlobalAdapter->incrementRefCount () == 0 ) {
678
+ if (GlobalAdapter->incrementRefCount () == 1 ) {
679
679
adapterStateInit ();
680
680
}
681
681
std::atexit (globalAdapterOnDemandCleanup);
You can’t perform that action at this time.
0 commit comments