Skip to content

Commit

Permalink
(test4)
Browse files Browse the repository at this point in the history
  • Loading branch information
SunSerega committed Oct 17, 2023
1 parent 3ed98ca commit 8f9de0e
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Modules/OpenCLABC.pas
Original file line number Diff line number Diff line change
Expand Up @@ -9120,10 +9120,7 @@ CLKernelArgPrivateCommon<TInp> = record
raise new OpenCLABCInternalException($'NULL Native');
{$endif DEBUG}
Result := new EnqRes(ev_l2, nil);

if l1_err_handler.HadError then exit;
if 'BranchUnCancel' in GetEXEFileName then
System.Environment.StackTrace.Println;

try
direct_enq_res := enq_f(prev_res, cq, ev_l2);
Expand All @@ -9141,7 +9138,20 @@ CLKernelArgPrivateCommon<TInp> = record
end;

var (enq_ev, act) := direct_enq_res;
if enq_ev=cl_event.Zero then exit;
Result.Item2 := act;

if enq_ev=cl_event.Zero then
begin
//TODO NVidia only
// - They have another incompatibility, where they don't return new event if input events had error
{$ifdef DEBUG}
var c: cl_context;
var ue := new UserEvent(c{$ifdef EventDebug}, $'Dummy instead of enq by {TypeName(q)}, waiting on: {ev_l2.evs?.JoinToString}'{$endif});
ue.SetComplete(true);
Result.Item1 := ev_l2 + cl_event(ue);
{$endif DEBUG}
exit;
end;

{$ifdef EventDebug}
EventDebug.RegisterEventRetain(enq_ev, $'Enq by {TypeName(q)}, waiting on: {ev_l2.evs?.JoinToString}');
Expand Down

0 comments on commit 8f9de0e

Please sign in to comment.