Vortex 2.0 changes:
+ Microarchitecture optimizations + 64-bit support + Xilinx FPGA support + LLVM-16 support + Refactoring and quality control fixes minor update minor update minor update minor update minor update minor update cleanup cleanup cache bindings and memory perf refactory minor update minor update hw unit tests fixes minor update minor update minor update minor update minor update minor udpate minor update minor update minor update minor update minor update minor update minor update minor updates minor updates minor update minor update minor update minor update minor update minor update minor updates minor updates minor updates minor updates minor update minor update
This commit is contained in:
@@ -1216,9 +1216,24 @@ pb_InitOpenCLContext(struct pb_Parameters* parameters) {
|
||||
cl_platform_id platform_id;
|
||||
cl_device_id device_id;
|
||||
cl_context context;
|
||||
clGetPlatformIDs(1, &platform_id, NULL);
|
||||
clGetDeviceIDs(platform_id, CL_DEVICE_TYPE_DEFAULT, 1, &device_id, NULL);
|
||||
context = clCreateContext(NULL, 1, &device_id, NULL, NULL, &_err);
|
||||
|
||||
_err = clGetPlatformIDs(1, &platform_id, NULL);
|
||||
if (_err != CL_SUCCESS) {
|
||||
fprintf(stderr, "Error querying platform!\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
_err = clGetDeviceIDs(platform_id, CL_DEVICE_TYPE_DEFAULT, 1, &device_id, NULL);
|
||||
if (_err != CL_SUCCESS) {
|
||||
fprintf(stderr, "Error querying device IDs!\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
context = clCreateContext(NULL, 1, &device_id, NULL, NULL, &_err);
|
||||
if (_err != CL_SUCCESS) {
|
||||
fprintf(stderr, "Error Creating device context!\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
pb_Context* c = (pb_Context*)malloc(sizeof(pb_Context));
|
||||
c->clContext = context;
|
||||
|
||||
Reference in New Issue
Block a user