[Beignet] [PATCH] Don't leak memory on long chains of events

2018-07-21 Thread Rebecca N. Palmer
Delete event->depend_events when it is no longer needed, to allow the event objects it refers to to be freed. This avoids out-of-memory hangs in large dependency trees (e.g. long iterative calculations): https://launchpad.net/bugs/1354086 Signed-off-by: Rebecca N. Palmer --- *Possibly* also

[Beignet] [PATCH] Add preliminary LLVM 7 support

2018-07-21 Thread Rebecca N. Palmer
This is preliminary because LLVM 7 has not been released yet: it was tested with the snapshot from Debian experimental (svn336894). 1.Change linking order, as clangCodeGen now links to clangFrontend 2.Pass references not pointers to WriteBitcodeToFile and CloneModule 3.Add the headers that

[Beignet] Add LLVM 6.0 support

2018-07-21 Thread Rebecca N. Palmer
LLVMContext::setDiagnosticHandler and LoopInfo::markAsRemoved have been renamed. Signed-off-by: Rebecca N. Palmer --- a/backend/src/llvm/llvm_to_gen.cpp +++ b/backend/src/llvm/llvm_to_gen.cpp @@ -322,7 +322,11 @@ namespace gbe DataLayout DL(); gbeDiagnosticContext dc; +#if

Re: [Beignet] [PATCH] Make in-order command queues actually be in-order

2018-07-21 Thread Rebecca N. Palmer
A demonstration that "in-order" queues currently aren't: //g++ -o queue_order_test queue_order_test.c -lOpenCL //Depends: beignet-opencl-icd ocl-icd-opencl-dev #include #include int main() { cl_int status; cl_device_id device; clGetDeviceIDs(NULL,CL_DEVICE_TYPE_ALL,1,,NULL); char

[Beignet] [PATCH] Make in-order command queues actually be in-order

2018-07-21 Thread Rebecca N. Palmer
When beignet added out-of-order execution support (7fd45f15), it made *all* command queues out-of-order, even if they were created as (and are reported by clGetCommandQueueInfo as) in-order. Signed-off-by: Rebecca N. Palmer --- Not sure whether this one is actually worth it: it's clearly against

[Beignet] [PATCH] More user-friendly "type not supported" errors

2018-07-21 Thread Rebecca N. Palmer
Output a meaningful error message instead of just sel.has*Type. In the case of double inputs (i.e. possibly literals), specify how to make a literal single precision. Signed-off-by: Rebecca N. Palmer --- Previously submitted as

[Beignet] [PATCH] Allow creating out-of-order queues with clCreateCommandQueue

2018-07-21 Thread Rebecca N. Palmer
clCreateCommandQueueWithProperties can already create them, but that's a 2.0 function. Signed-off-by: Rebecca N. Palmer --- yes, this currently gives you out-of-order if you ask for in-order, but says "can't do that" if you ask for out-of-order... --- a/src/cl_api_command_queue.c +++