Skip to content

Commit

Permalink
Add second tag check in clUnloadCompiler pointer.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerilk committed Sep 13, 2024
1 parent f348269 commit 6e908eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ocl_icd_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,11 @@ static inline void _find_and_check_platforms(cl_uint num_icds) {
continue;
}

if (KHR_ICD2_HAS_TAG(p->pid) && !(((size_t)((p->pid)->dispatch->clUnloadCompiler)) == CL_ICD2_TAG_KHR)) {
debug(D_WARN, "Found icd 2 platform, but it is missing clUnloadCompiler tag, skipping it");
continue;
}

if (KHR_ICD2_HAS_TAG(p->pid))
{
_populate_dispatch_table(p->pid, pltfn_fn_ptr, &p->disp_data.dispatch);
Expand Down

0 comments on commit 6e908eb

Please sign in to comment.