kpet / clvk

Implementation of OpenCL 3.0 on Vulkan
Apache License 2.0
341 stars 39 forks source link

Can it be build on Win10 #173

Closed tingxingdong closed 4 years ago

tingxingdong commented 4 years ago

Somehow, I must build on Win10. I use VS2017. I see tons of errors. Have you tried on Win10? It seems that I can get clspv.exe but tons of erros to build libOpenCL

image

kpet commented 4 years ago

Currently there is no continuous integration in place for Windows. I don't have a machine with Windows. I do try to be careful to use (and ask others to use) standard C++/POSIX features but without testing, issues are bound to exist.

The errors you posted seem to related to the OpenCL Headers / your build environement more than clvk itself. Could you attach a full log file please?

tingxingdong commented 4 years ago

83>------ Build started: Project: OpenCL-objects, Configuration: Debug Win32 ------ 83>api.cpp 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(773): error C2061: syntax error: identifier 'cl_d3d10_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(779): error C2061: syntax error: identifier 'ID3D10Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(783): error C2061: syntax error: identifier 'ID3D10Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(787): error C2061: syntax error: identifier 'ID3D10Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(805): error C2061: syntax error: identifier 'cl_d3d10_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(811): error C2061: syntax error: identifier 'ID3D10Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(814): error C2061: syntax error: identifier 'ID3D10Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(818): error C2061: syntax error: identifier 'ID3D10Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(833): error C2061: syntax error: identifier 'cl_d3d11_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(839): error C2061: syntax error: identifier 'ID3D11Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(843): error C2061: syntax error: identifier 'ID3D11Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(847): error C2061: syntax error: identifier 'ID3D11Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(868): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(874): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(893): error C2061: syntax error: identifier 'cl_d3d11_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(899): error C2061: syntax error: identifier 'ID3D11Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(902): error C2061: syntax error: identifier 'ID3D11Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(906): error C2061: syntax error: identifier 'ID3D11Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(922): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(928): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\src\api.cpp(118): error C2373: 'clGetPlatformIDs': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(878): note: see declaration of 'clGetPlatformIDs' 83>C:\Users\tim.dong\clvk\src\api.cpp(126): error C2373: 'clGetPlatformInfo': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(883): note: see declaration of 'clGetPlatformInfo' 83>C:\Users\tim.dong\clvk\src\api.cpp(218): error C2373: 'clGetExtensionFunctionAddressForPlatform': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1740): note: see declaration of 'clGetExtensionFunctionAddressForPlatform' 83>C:\Users\tim.dong\clvk\src\api.cpp(229): error C2373: 'clGetExtensionFunctionAddress': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1802): note: see declaration of 'clGetExtensionFunctionAddress' 83>C:\Users\tim.dong\clvk\src\api.cpp(236): error C2373: 'clGetDeviceIDs': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(891): note: see declaration of 'clGetDeviceIDs' 83>C:\Users\tim.dong\clvk\src\api.cpp(281): error C2373: 'clGetDeviceInfo': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(898): note: see declaration of 'clGetDeviceInfo' 83>C:\Users\tim.dong\clvk\src\api.cpp(431): warning C4244: '=': conversion from 'const VkDeviceSize' to 'cl_uint', possible loss of data 83>C:\Users\tim.dong\clvk\src\api.cpp(650): error C2373: 'clCreateSubDevices': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(907): note: see declaration of 'clCreateSubDevices' 83>C:\Users\tim.dong\clvk\src\api.cpp(662): error C2373: 'clRetainDevice': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(914): note: see declaration of 'clRetainDevice' 83>C:\Users\tim.dong\clvk\src\api.cpp(672): error C2373: 'clReleaseDevice': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(917): note: see declaration of 'clReleaseDevice' 83>C:\Users\tim.dong\clvk\src\api.cpp(683): error C2373: 'clCreateContext': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(941): note: see declaration of 'clCreateContext' 83>C:\Users\tim.dong\clvk\src\api.cpp(708): error C2373: 'clCreateContextFromType': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(952): note: see declaration of 'clCreateContextFromType' 83>C:\Users\tim.dong\clvk\src\api.cpp(718): error C2065: 'clGetDeviceIDs': undeclared identifier 83>C:\Users\tim.dong\clvk\src\api.cpp(718): error C2440: 'initializing': cannot convert from 'cl_int (stdcall )(cl_platform_id,cl_device_type,cl_uint,cl_device_id ,cl_uint )' to 'cl_int' 83>C:\Users\tim.dong\clvk\src\api.cpp(718): note: There is no context in which this conversion is possible 83>C:\Users\tim.dong\clvk\src\api.cpp(721): error C2065: 'clCreateContext': undeclared identifier 83>C:\Users\tim.dong\clvk\src\api.cpp(729): error C2373: 'clRetainContext': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(962): note: see declaration of 'clRetainContext' 83>C:\Users\tim.dong\clvk\src\api.cpp(741): error C2373: 'clReleaseContext': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(965): note: see declaration of 'clReleaseContext' 83>C:\Users\tim.dong\clvk\src\api.cpp(753): error C2373: 'clGetContextInfo': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(968): note: see declaration of 'clGetContextInfo' 83>C:\Users\tim.dong\clvk\src\api.cpp(811): error C2373: 'clWaitForEvents': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1340): note: see declaration of 'clWaitForEvents' 83>C:\Users\tim.dong\clvk\src\api.cpp(828): error C2373: 'clEnqueueWaitForEvents': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1791): note: see declaration of 'clEnqueueWaitForEvents' 83>C:\Users\tim.dong\clvk\src\api.cpp(836): error C2373: 'clReleaseEvent': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1362): note: see declaration of 'clReleaseEvent' 83>C:\Users\tim.dong\clvk\src\api.cpp(848): error C2373: 'clRetainEvent': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1359): note: see declaration of 'clRetainEvent' 83>C:\Users\tim.dong\clvk\src\api.cpp(860): error C2373: 'clCreateUserEvent': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1353): note: see declaration of 'clCreateUserEvent' 83>C:\Users\tim.dong\clvk\src\api.cpp(879): error C2373: 'clSetUserEventStatus': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1367): note: see declaration of 'clSetUserEventStatus' 83>C:\Users\tim.dong\clvk\src\api.cpp(891): error C2373: 'clSetEventCallback': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1371): note: see declaration of 'clSetEventCallback' 83>C:\Users\tim.dong\clvk\src\api.cpp(908): error C2664: 'void cvk_event::register_callback(cl_int,cvk_event_callback_pointer_type,void )': cannot convert argument 2 from 'void (stdcall )(cl_event,cl_int,void )' to 'cvk_event_callback_pointer_type' 83>C:\Users\tim.dong\clvk\src\api.cpp(909): note: This conversion requires a reinterpret_cast, a C-style cast or function-style cast 83>C:\Users\tim.dong\clvk\src\api.cpp(951): error C2373: 'clEnqueueMarkerWithWaitList': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1649): note: see declaration of 'clEnqueueMarkerWithWaitList' 83>C:\Users\tim.dong\clvk\src\api.cpp(965): error C2373: 'clEnqueueMarker': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1787): note: see declaration of 'clEnqueueMarker' 83>C:\Users\tim.dong\clvk\src\api.cpp(992): error C2373: 'clEnqueueBarrierWithWaitList': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1655): note: see declaration of 'clEnqueueBarrierWithWaitList' 83>C:\Users\tim.dong\clvk\src\api.cpp(1006): error C2373: 'clEnqueueBarrier': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1796): note: see declaration of 'clEnqueueBarrier' 83>C:\Users\tim.dong\clvk\src\api.cpp(1013): error C2373: 'clGetEventInfo': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1344): note: see declaration of 'clGetEventInfo' 83>C:\Users\tim.dong\clvk\src\api.cpp(1119): error C2373: 'clCreateCommandQueue': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1806): note: see declaration of 'clCreateCommandQueue' 83>C:\Users\tim.dong\clvk\src\api.cpp(1170): error C2373: 'clCreateCommandQueueWithProperties': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(979): note: see declaration of 'clCreateCommandQueueWithProperties' 83>C:\Users\tim.dong\clvk\src\api.cpp(1181): error C2373: 'clCreateCommandQueueWithPropertiesKHR': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_ext.h(214): note: see declaration of 'clCreateCommandQueueWithPropertiesKHR' 83>C:\Users\tim.dong\clvk\src\api.cpp(1191): error C2373: 'clReleaseCommandQueue': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(990): note: see declaration of 'clReleaseCommandQueue' 83>C:\Users\tim.dong\clvk\src\api.cpp(1202): error C2373: 'clRetainCommandQueue': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(987): note: see declaration of 'clRetainCommandQueue' 83>C:\Users\tim.dong\clvk\src\api.cpp(1213): error C2373: 'clGetCommandQueueInfo': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(993): note: see declaration of 'clGetCommandQueueInfo' 83>C:\Users\tim.dong\clvk\src\api.cpp(1276): error C2373: 'clCreateBuffer': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1001): note: see declaration of 'clCreateBuffer' 83>C:\Users\tim.dong\clvk\src\api.cpp(1297): error C2373: 'clCreateSubBuffer': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1010): note: see declaration of 'clCreateSubBuffer' 83>C:\Users\tim.dong\clvk\src\api.cpp(1361): error C2373: 'clRetainMemObject': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1043): note: see declaration of 'clRetainMemObject' 83>C:\Users\tim.dong\clvk\src\api.cpp(1373): error C2373: 'clReleaseMemObject': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1046): note: see declaration of 'clReleaseMemObject' 83>C:\Users\tim.dong\clvk\src\api.cpp(1385): error C2373: 'clSetMemObjectDestructorCallback': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1084): note: see declaration of 'clSetMemObjectDestructorCallback' 83>C:\Users\tim.dong\clvk\src\api.cpp(1400): error C2664: 'void cvk_mem::add_destructor_callback(cvk_mem_callback_pointer_type,void )': cannot convert argument 1 from 'void (__stdcall )(cl_mem,void )' to 'cvk_mem_callback_pointer_type' 83>C:\Users\tim.dong\clvk\src\api.cpp(1400): note: This conversion requires a reinterpret_cast, a C-style cast or function-style cast 83>C:\Users\tim.dong\clvk\src\api.cpp(1405): error C2373: 'clEnqueueMigrateMemObjects': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1613): note: see declaration of 'clEnqueueMigrateMemObjects' 83>C:\Users\tim.dong\clvk\src\api.cpp(1462): error C2373: 'clGetMemObjectInfo': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1057): note: see declaration of 'clGetMemObjectInfo' 83>C:\Users\tim.dong\clvk\src\api.cpp(1552): error C2373: 'clCreateProgramWithSource': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1133): note: see declaration of 'clCreateProgramWithSource' 83>C:\Users\tim.dong\clvk\src\api.cpp(1582): error C2373: 'clCreateProgramWithBinary': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1140): note: see declaration of 'clCreateProgramWithBinary' 83>C:\Users\tim.dong\clvk\src\api.cpp(1650): error C2373: 'clBuildProgram': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1176): note: see declaration of 'clBuildProgram' 83>C:\Users\tim.dong\clvk\src\api.cpp(1695): error C2664: 'bool cvk_program::build(build_operation,cl_uint,const cl_device_id ,const char ,cl_uint,const cl_program ,const char ,cvk_program_callback,void )': cannot convert argument 8 from 'void (__stdcall )(cl_program,void )' to 'cvk_program_callback' 83>C:\Users\tim.dong\clvk\src\api.cpp(1696): note: This conversion requires a reinterpret_cast, a C-style cast or function-style cast 83>C:\Users\tim.dong\clvk\src\api.cpp(1712): error C2373: 'clCompileProgram': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1187): note: see declaration of 'clCompileProgram' 83>C:\Users\tim.dong\clvk\src\api.cpp(1764): error C2664: 'bool cvk_program::build(build_operation,cl_uint,const cl_device_id ,const char ,cl_uint,const cl_program ,const char ,cvk_program_callback,void )': cannot convert argument 8 from 'void (__stdcall )(cl_program,void )' to 'cvk_program_callback' 83>C:\Users\tim.dong\clvk\src\api.cpp(1766): note: This conversion requires a reinterpret_cast, a C-style cast or function-style cast 83>C:\Users\tim.dong\clvk\src\api.cpp(1782): error C2373: 'clLinkProgram': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1199): note: see declaration of 'clLinkProgram' 83>C:\Users\tim.dong\clvk\src\api.cpp(1853): error C2664: 'bool cvk_program::build(build_operation,cl_uint,const cl_device_id ,const char ,cl_uint,const cl_program ,const char *,cvk_program_callback,void )': cannot convert argument 8 from 'void (__stdcall )(cl_program,void )' to 'cvk_program_callback' 83>C:\Users\tim.dong\clvk\src\api.cpp(1855): note: This conversion requires a reinterpret_cast, a C-style cast or function-style cast 83>C:\Users\tim.dong\clvk\src\api.cpp(1881): error C2373: 'clUnloadPlatformCompiler': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1231): note: see declaration of 'clUnloadPlatformCompiler' 83>C:\Users\tim.dong\clvk\src\api.cpp(1891): error C2373: 'clUnloadCompiler': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1799): note: see declaration of 'clUnloadCompiler' 83>C:\Users\tim.dong\clvk\src\api.cpp(1897): error C2373: 'clGetProgramInfo': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1236): note: see declaration of 'clGetProgramInfo' 83>C:\Users\tim.dong\clvk\src\api.cpp(2014): error C2373: 'clGetProgramBuildInfo': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1243): note: see declaration of 'clGetProgramBuildInfo' 83>C:\Users\tim.dong\clvk\src\api.cpp(2075): error C2373: 'clRetainProgram': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1170): note: see declaration of 'clRetainProgram' 83>C:\Users\tim.dong\clvk\src\api.cpp(2086): error C2373: 'clReleaseProgram': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1173): note: see declaration of 'clReleaseProgram' 83>C:\Users\tim.dong\clvk\src\api.cpp(2112): error C2373: 'clCreateKernel': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1252): note: see declaration of 'clCreateKernel' 83>C:\Users\tim.dong\clvk\src\api.cpp(2142): error C2373: 'clCreateKernelsInProgram': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1257): note: see declaration of 'clCreateKernelsInProgram' 83>C:\Users\tim.dong\clvk\src\api.cpp(2183): error C2373: 'clSetKernelArg': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1277): note: see declaration of 'clSetKernelArg' 83>C:\Users\tim.dong\clvk\src\api.cpp(2230): error C2373: 'clGetKernelInfo': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1298): note: see declaration of 'clGetKernelInfo' 83>C:\Users\tim.dong\clvk\src\api.cpp(2295): error C2373: 'clGetKernelArgInfo': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1307): note: see declaration of 'clGetKernelArgInfo' 83>C:\Users\tim.dong\clvk\src\api.cpp(2308): error C2373: 'clGetKernelWorkGroupInfo': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1317): note: see declaration of 'clGetKernelWorkGroupInfo' 83>C:\Users\tim.dong\clvk\src\api.cpp(2369): error C2373: 'clRetainKernel': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1271): note: see declaration of 'clRetainKernel' 83>C:\Users\tim.dong\clvk\src\api.cpp(2381): error C2373: 'clReleaseKernel': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1274): note: see declaration of 'clReleaseKernel' 83>C:\Users\tim.dong\clvk\src\api.cpp(2394): error C2373: 'clGetEventProfilingInfo': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1382): note: see declaration of 'clGetEventProfilingInfo' 83>C:\Users\tim.dong\clvk\src\api.cpp(2443): error C2373: 'clFlush': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1390): note: see declaration of 'clFlush' 83>C:\Users\tim.dong\clvk\src\api.cpp(2453): error C2373: 'clFinish': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1393): note: see declaration of 'clFinish' 83>C:\Users\tim.dong\clvk\src\api.cpp(2473): error C2373: 'clEnqueueReadBuffer': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1397): note: see declaration of 'clEnqueueReadBuffer' 83>C:\Users\tim.dong\clvk\src\api.cpp(2510): error C2373: 'clEnqueueWriteBuffer': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1428): note: see declaration of 'clEnqueueWriteBuffer' 83>C:\Users\tim.dong\clvk\src\api.cpp(2550): error C2373: 'clEnqueueReadBufferRect': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1410): note: see declaration of 'clEnqueueReadBufferRect' 83>C:\Users\tim.dong\clvk\src\api.cpp(2602): error C2373: 'clEnqueueWriteBufferRect': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1441): note: see declaration of 'clEnqueueWriteBufferRect' 83>C:\Users\tim.dong\clvk\src\api.cpp(2653): error C2373: 'clEnqueueFillBuffer': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1461): note: see declaration of 'clEnqueueFillBuffer' 83>C:\Users\tim.dong\clvk\src\api.cpp(2716): error C2373: 'clEnqueueCopyBuffer': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1474): note: see declaration of 'clEnqueueCopyBuffer' 83>C:\Users\tim.dong\clvk\src\api.cpp(2756): error C2373: 'clEnqueueCopyBufferRect': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1487): note: see declaration of 'clEnqueueCopyBufferRect' 83>C:\Users\tim.dong\clvk\src\api.cpp(2842): error C2373: 'clEnqueueMapBuffer': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1577): note: see declaration of 'clEnqueueMapBuffer' 83>C:\Users\tim.dong\clvk\src\api.cpp(2943): error C2373: 'clEnqueueUnmapMemObject': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1603): note: see declaration of 'clEnqueueUnmapMemObject' 83>C:\Users\tim.dong\clvk\src\api.cpp(3118): error C2373: 'clEnqueueTask': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1819): note: see declaration of 'clEnqueueTask' 83>C:\Users\tim.dong\clvk\src\api.cpp(3136): error C2373: 'clEnqueueNDRangeKernel': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1624): note: see declaration of 'clEnqueueNDRangeKernel' 83>C:\Users\tim.dong\clvk\src\api.cpp(3215): error C2373: 'clCreateSampler': redefinition; different type modifiers 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl.h(1812): note: see declaration of 'clCreateSampler' 83>C:\Users\tim.dong\clvk\src\api.cpp(3217): fatal error C1003: error count exceeds 100; stopping compilation 83>device.cpp 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(773): error C2061: syntax error: identifier 'cl_d3d10_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(779): error C2061: syntax error: identifier 'ID3D10Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(783): error C2061: syntax error: identifier 'ID3D10Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(787): error C2061: syntax error: identifier 'ID3D10Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(805): error C2061: syntax error: identifier 'cl_d3d10_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(811): error C2061: syntax error: identifier 'ID3D10Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(814): error C2061: syntax error: identifier 'ID3D10Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(818): error C2061: syntax error: identifier 'ID3D10Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(833): error C2061: syntax error: identifier 'cl_d3d11_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(839): error C2061: syntax error: identifier 'ID3D11Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(843): error C2061: syntax error: identifier 'ID3D11Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(847): error C2061: syntax error: identifier 'ID3D11Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(868): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(874): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(893): error C2061: syntax error: identifier 'cl_d3d11_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(899): error C2061: syntax error: identifier 'ID3D11Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(902): error C2061: syntax error: identifier 'ID3D11Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(906): error C2061: syntax error: identifier 'ID3D11Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(922): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(928): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\src\device.cpp(257): warning C4244: 'initializing': conversion from 'VkDeviceSize' to 'uint32_t', possible loss of data 83>init.cpp 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(773): error C2061: syntax error: identifier 'cl_d3d10_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(779): error C2061: syntax error: identifier 'ID3D10Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(783): error C2061: syntax error: identifier 'ID3D10Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(787): error C2061: syntax error: identifier 'ID3D10Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(805): error C2061: syntax error: identifier 'cl_d3d10_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(811): error C2061: syntax error: identifier 'ID3D10Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(814): error C2061: syntax error: identifier 'ID3D10Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(818): error C2061: syntax error: identifier 'ID3D10Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(833): error C2061: syntax error: identifier 'cl_d3d11_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(839): error C2061: syntax error: identifier 'ID3D11Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(843): error C2061: syntax error: identifier 'ID3D11Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(847): error C2061: syntax error: identifier 'ID3D11Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(868): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(874): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(893): error C2061: syntax error: identifier 'cl_d3d11_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(899): error C2061: syntax error: identifier 'ID3D11Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(902): error C2061: syntax error: identifier 'ID3D11Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(906): error C2061: syntax error: identifier 'ID3D11Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(922): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(928): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\src\init.cpp(167): error C2440: 'initializing': cannot convert from 'VkBool32 (__cdecl )(VkDebugReportFlagsEXT,VkDebugReportObjectTypeEXT,uint64_t,size_t,int32_t,const char ,const char ,void )' to 'PFN_vkDebugReportCallbackEXT' 83>C:\Users\tim.dong\clvk\src\init.cpp(167): note: None of the functions with this name in scope match the target type 83>C:\Users\tim.dong\clvk\src\init.cpp(129): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 83>C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\stdlib.h(1191): note: see declaration of 'getenv' 83>C:\Users\tim.dong\clvk\src\init.cpp(190): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 83>C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\stdlib.h(1191): note: see declaration of 'getenv' 83>C:\Users\tim.dong\clvk\src\init.cpp(199): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 83>C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\stdlib.h(1191): note: see declaration of 'getenv' 83>C:\Users\tim.dong\clvk\src\init.cpp(210): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 83>C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\stdlib.h(1191): note: see declaration of 'getenv' 83>C:\Users\tim.dong\clvk\src\init.cpp(214): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 83>C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\stdlib.h(1191): note: see declaration of 'getenv' 83>C:\Users\tim.dong\clvk\src\init.cpp(219): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 83>C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\stdlib.h(1191): note: see declaration of 'getenv' 83>C:\Users\tim.dong\clvk\src\init.cpp(223): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 83>C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\stdlib.h(1191): note: see declaration of 'getenv' 83>kernel.cpp 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(773): error C2061: syntax error: identifier 'cl_d3d10_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(779): error C2061: syntax error: identifier 'ID3D10Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(783): error C2061: syntax error: identifier 'ID3D10Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(787): error C2061: syntax error: identifier 'ID3D10Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(805): error C2061: syntax error: identifier 'cl_d3d10_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(811): error C2061: syntax error: identifier 'ID3D10Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(814): error C2061: syntax error: identifier 'ID3D10Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(818): error C2061: syntax error: identifier 'ID3D10Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(833): error C2061: syntax error: identifier 'cl_d3d11_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(839): error C2061: syntax error: identifier 'ID3D11Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(843): error C2061: syntax error: identifier 'ID3D11Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(847): error C2061: syntax error: identifier 'ID3D11Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(868): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(874): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(893): error C2061: syntax error: identifier 'cl_d3d11_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(899): error C2061: syntax error: identifier 'ID3D11Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(902): error C2061: syntax error: identifier 'ID3D11Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(906): error C2061: syntax error: identifier 'ID3D11Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(922): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(928): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>memory.cpp 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(773): error C2061: syntax error: identifier 'cl_d3d10_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(779): error C2061: syntax error: identifier 'ID3D10Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(783): error C2061: syntax error: identifier 'ID3D10Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(787): error C2061: syntax error: identifier 'ID3D10Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(805): error C2061: syntax error: identifier 'cl_d3d10_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(811): error C2061: syntax error: identifier 'ID3D10Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(814): error C2061: syntax error: identifier 'ID3D10Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(818): error C2061: syntax error: identifier 'ID3D10Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(833): error C2061: syntax error: identifier 'cl_d3d11_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(839): error C2061: syntax error: identifier 'ID3D11Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(843): error C2061: syntax error: identifier 'ID3D11Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(847): error C2061: syntax error: identifier 'ID3D11Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(868): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(874): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(893): error C2061: syntax error: identifier 'cl_d3d11_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(899): error C2061: syntax error: identifier 'ID3D11Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(902): error C2061: syntax error: identifier 'ID3D11Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(906): error C2061: syntax error: identifier 'ID3D11Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(922): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(928): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>program.cpp 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(773): error C2061: syntax error: identifier 'cl_d3d10_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(779): error C2061: syntax error: identifier 'ID3D10Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(783): error C2061: syntax error: identifier 'ID3D10Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(787): error C2061: syntax error: identifier 'ID3D10Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(805): error C2061: syntax error: identifier 'cl_d3d10_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(811): error C2061: syntax error: identifier 'ID3D10Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(814): error C2061: syntax error: identifier 'ID3D10Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(818): error C2061: syntax error: identifier 'ID3D10Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(833): error C2061: syntax error: identifier 'cl_d3d11_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(839): error C2061: syntax error: identifier 'ID3D11Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(843): error C2061: syntax error: identifier 'ID3D11Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(847): error C2061: syntax error: identifier 'ID3D11Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(868): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(874): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(893): error C2061: syntax error: identifier 'cl_d3d11_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(899): error C2061: syntax error: identifier 'ID3D11Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(902): error C2061: syntax error: identifier 'ID3D11Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(906): error C2061: syntax error: identifier 'ID3D11Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(922): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(928): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\src\program.cpp(78): warning C4244: 'initializing': conversion from 'std::streamoff' to 'uint32_t', possible loss of data 83>queue.cpp 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(773): error C2061: syntax error: identifier 'cl_d3d10_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(779): error C2061: syntax error: identifier 'ID3D10Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(783): error C2061: syntax error: identifier 'ID3D10Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(787): error C2061: syntax error: identifier 'ID3D10Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(805): error C2061: syntax error: identifier 'cl_d3d10_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(811): error C2061: syntax error: identifier 'ID3D10Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(814): error C2061: syntax error: identifier 'ID3D10Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(818): error C2061: syntax error: identifier 'ID3D10Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(833): error C2061: syntax error: identifier 'cl_d3d11_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(839): error C2061: syntax error: identifier 'ID3D11Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(843): error C2061: syntax error: identifier 'ID3D11Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(847): error C2061: syntax error: identifier 'ID3D11Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(868): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(874): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(893): error C2061: syntax error: identifier 'cl_d3d11_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(899): error C2061: syntax error: identifier 'ID3D11Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(902): error C2061: syntax error: identifier 'ID3D11Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(906): error C2061: syntax error: identifier 'ID3D11Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(922): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(928): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\src\queue.cpp(473): warning C4244: '=': conversion from 'double' to 'uint64_t', possible loss of data 83>C:\Users\tim.dong\clvk\src\queue.cpp(474): warning C4244: '=': conversion from 'double' to 'uint64_t', possible loss of data 83>utils.cpp 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(773): error C2061: syntax error: identifier 'cl_d3d10_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(779): error C2061: syntax error: identifier 'ID3D10Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(783): error C2061: syntax error: identifier 'ID3D10Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(787): error C2061: syntax error: identifier 'ID3D10Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(805): error C2061: syntax error: identifier 'cl_d3d10_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(811): error C2061: syntax error: identifier 'ID3D10Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(814): error C2061: syntax error: identifier 'ID3D10Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(818): error C2061: syntax error: identifier 'ID3D10Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(833): error C2061: syntax error: identifier 'cl_d3d11_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(839): error C2061: syntax error: identifier 'ID3D11Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(843): error C2061: syntax error: identifier 'ID3D11Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(847): error C2061: syntax error: identifier 'ID3D11Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(868): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(874): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(893): error C2061: syntax error: identifier 'cl_d3d11_device_source_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(899): error C2061: syntax error: identifier 'ID3D11Buffer' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(902): error C2061: syntax error: identifier 'ID3D11Texture2D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(906): error C2061: syntax error: identifier 'ID3D11Texture3D' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(922): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>C:\Users\tim.dong\clvk\external\OpenCL-Headers\CL/cl_icd.h(928): error C2061: syntax error: identifier 'cl_dx9_media_adapter_type_khr' 83>c:\users\tim.dong\clvk\src\device.hpp(92): error C2589: '(': illegal token on right side of '::' 83>c:\users\tim.dong\clvk\src\device.hpp(92): error C2062: type 'unknown-type' unexpected 83>c:\users\tim.dong\clvk\src\device.hpp(92): error C2059: syntax error: ')' 83>c:\users\tim.dong\clvk\src\device.hpp(98): error C2589: '(': illegal token on right side of '::' 83>c:\users\tim.dong\clvk\src\device.hpp(98): error C2062: type 'unknown-type' unexpected 83>c:\users\tim.dong\clvk\src\device.hpp(98): error C2059: syntax error: ')' 83>c:\users\tim.dong\clvk\src\device.hpp(103): error C2589: '(': illegal token on right side of '::' 83>c:\users\tim.dong\clvk\src\device.hpp(103): error C2062: type 'unknown-type' unexpected 83>c:\users\tim.dong\clvk\src\device.hpp(103): error C2059: syntax error: ')' 83>c:\users\tim.dong\clvk\src\device.hpp(113): error C2589: '(': illegal token on right side of '::' 83>c:\users\tim.dong\clvk\src\device.hpp(113): error C2062: type 'unknown-type' unexpected 83>c:\users\tim.dong\clvk\src\device.hpp(113): error C2059: syntax error: ')' 83>C:\Users\tim.dong\clvk\src\utils.cpp(157): warning C4244: 'initializing': conversion from 'uint64_t' to 'float', possible loss of data 83>C:\Users\tim.dong\clvk\src\utils.cpp(168): warning C4129: 'e': unrecognized character escape sequence 83>C:\Users\tim.dong\clvk\src\utils.cpp(169): warning C4129: 'e': unrecognized character escape sequence 83>C:\Users\tim.dong\clvk\src\utils.cpp(170): warning C4129: 'e': unrecognized character escape sequence 83>Generating Code... 83>Done building project "OpenCL-objects.vcxproj" -- FAILED. 84>------ Build started: Project: OpenCL, Configuration: Debug Win32 ------ 84>LINK : fatal error LNK1104: cannot open file 'C:\Users\tim.dong\clvk\build\src\OpenCL-objects.dir\Debug\api.obj' 84>Done building project "OpenCL.vcxproj" -- FAILED.

tingxingdong commented 4 years ago

somehow my VS2017 only shows win32 option. no x64 is allowed. image

fodinabor commented 4 years ago

The latter is probably as you have to tell CMake to generate 64 or 32 bit builds, the default is 32bit. For VS 2017 cmake -G "Visual Studio 15 2017 Win64" .. should generate 64bit build files

tingxingdong commented 4 years ago

@fodinabor , thanks. After switching to Win64, basically still the same errors as Win32.

kpet commented 4 years ago

@tingxingdong Thanks for the log. As I suspected the first issue comes from CL/cl_icd.h which is not self-contained on Windows.

I suggest you add the following alongside other header includes at the top of external/OpenCL-Headers/CL/cl_cd.h:

#if defined(_WIN32)
#include <CL/cl_d3d10.h>
#include <CL/cl_d3d11.h>
#endif

This should fix all the errors flagged in CL/cl_icd.h. If this does work, feel free to open a PR against https://github.com/KhronosGroup/OpenCL-Headers. I've created https://github.com/KhronosGroup/OpenCL-Headers/issues/80 to report the issue.

I think the remaining errors in device.hpp are a consequence of the cl_icd.h issue. At least I can't figure out what's wrong/missing from this log.

On to utils.cpp. I think the following should fix the first issue:

-    float fsize = size;
+    float fsize = static_cast<float>(size);

and the following can be defined to empty strings as a workaround: colourRed, colourYellow and colourReset. The only consequence is that you won't get coloured output when logging is enabled.

You're of course more than welcome to open PRs with fixes :). Let me know how you get on.

fodinabor commented 4 years ago

Also you'll want to add this to src/CMakeLists.txt ~line 93:

if(MSVC)
    target_compile_definitions(OpenCL-objects PRIVATE
        NOMINMAX)
endif()

And don't forget to make tell CMake to export everything (I made this after the first `if(NOT MSVC) in src/CMakeLists):

else()
    set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()

And don't miss the DirectX 9 header:

#if defined(_WIN32)
#include <CL/cl_dx9_media_sharing.h>
#include <CL/cl_d3d10.h>
#include <CL/cl_d3d11.h>
#endif

I also had to replace line 34 in externals/OpenCL-Headers/CL/cl_d3d10.h with this: #include <d3d10_1.h>

then the API test looks like this (dunno whether that's good or bad.. :D): image

fodinabor commented 4 years ago

See #175 and KhronosGroup/OpenCL-Headers#81 - those are the fixes described above. If needed I'll make those PRs a bit more resilient tomorrow.

tingxingdong commented 4 years ago

@fodinabor .your fix works for me. I am able to get OpeCL.lib now. Simple_test passed.

image

kpet commented 4 years ago

@fodinabor You rock :). Thank you very much for the help and the PRs!

@tingxingdong Thanks for the feedback!

I'm afraid I have to report that neither @fodinabor nor @tingxingdong have been running the tests against clvk though. You would be seeing Platform: clvk in the output. I wouldn't worry too much about the api test failures as most of these tests are testing implementation-defined behaviour. CreateImageLegacy however ought to work on any 1.2+ OpenCL implementation. @fodinabor You may want to report this to NVidia.

I don't how what the equivalent of LD_LIBRARY_PATH is on Windows (or indeed if there is one) but I'm pretty confident you can use the OpenCL ICD Loader to run applications against clvk. I've created https://github.com/kpet/clvk/issues/176 to cover adding documentation. Input is welcome here.

fodinabor commented 4 years ago

Ups. xD I've never used clvk before, so I didn't notice... :D

There's no such equivalent afaik, just the usual PATH variable - but one way to force using clvk would be linking statically, as in simple_test_static.exe.

To use the shared library, clvk's OpenCL.dll would have to reside in the same directory as the to-be-run exe file or the OpenCL.dll has to be added to the PATH variable. Also see the dll search order. Alternatively, I guess it could be added to the registry key, where the default icd has a look? Then - as I understand it - it should appear as a new platform in OpenCL applications?

@tingxingdong can you confirm that any of these approaches work? The easiest probably is running simple_test_static.exe :) Otherwise I can have a look tonight :)

kpet commented 4 years ago

@fodinabor Thanks! I will have some reading to do.

Alternatively, I guess it could be added to the registry key, where the default icd has a look? Then - as I understand it - it should appear as a new platform in OpenCL applications?

Yes, that should be the behaviour once the clvk ICD is declared to the loader.

fodinabor commented 4 years ago

This now looks pretty promising to me: image

I'll have to investigate the ICD version a bit further..

tingxingdong commented 4 years ago

@fodinabor @kpet I am not able to see clvk platform in simple_test.exe. simple_test_static gives a segment fault immediately. I think the linker linked to the new build libOpenCL.lib. What else should I try?

image

tingxingdong commented 4 years ago

Ok. After I copy *.dll to the same exe folder. then re-run it in cmd and it aborts.

$ ldd ./simple_test.exe ntdll.dll => /c/windows/SYSTEM32/ntdll.dll (0x7ff973cd0000) KERNEL32.DLL => /c/windows/System32/KERNEL32.DLL (0x7ff972890000) KERNELBASE.dll => /c/windows/System32/KERNELBASE.dll (0x7ff970d50000) SYSFER.DLL => /c/windows/System32/SYSFER.DLL (0x56940000) OpenCL.dll => /c/Users/tim.dong/clvk/build/Debug/OpenCL.dll (0x7ff901ee0000) VCRUNTIME140D.dll => /c/windows/SYSTEM32/VCRUNTIME140D.dll (0x7ff9655a0000) ucrtbased.dll => /c/windows/SYSTEM32/ucrtbased.dll (0x7ff90e090000) vulkan-1.dll => /c/windows/SYSTEM32/vulkan-1.dll (0x7ff939e30000) MSVCP140D.dll => /c/windows/SYSTEM32/MSVCP140D.dll (0x7ff939930000) CFGMGR32.dll => /c/windows/System32/CFGMGR32.dll (0x7ff9703c0000) ucrtbase.dll => /c/windows/System32/ucrtbase.dll (0x7ff971040000) ADVAPI32.dll => /c/windows/System32/ADVAPI32.dll (0x7ff972e60000) msvcrt.dll => /c/windows/System32/msvcrt.dll (0x7ff972ab0000) sechost.dll => /c/windows/System32/sechost.dll (0x7ff972940000) RPCRT4.dll => /c/windows/System32/RPCRT4.dll (0x7ff972fc0000)

fodinabor commented 4 years ago

uhm.. when I run it in Debug mode I get an assertion window popping up: image with the following error on the debug console:

d:\agent\_work\2\s\src\vctools\crt\crtw32\stdcpp\thr\mutex.cpp(165): unlock of unowned mutex

seems to originate in build as the mutex is locked in one thread and then do_build is called in another thread, which unlocks the mutex m_lock in that new thread again, although mutexes should be unlocked from the thread they were locked on afaik..

Not sure what a good way of handling this would be, except moving all code from build to do_build.

kpet commented 4 years ago

@fodinabor The test output looks good (don't worry too much about the failing test, it's not guaranteed to pass on all Vulkan implementations). The abort you're seeing with debug builds is a known issue that @jrprice reported a couple of weeks ago (see https://github.com/kpet/clvk/issues/162). @jrprice Are you still looking at that one?

@tingxingdong You might be hitting the same issue. Can you try a release build please?

jrprice commented 4 years ago

@jrprice Are you still looking at that one?

I was still planning to look at this, but probably won't have a chance until next week at the earliest now. If somebody else wants to take a look before then feel free, otherwise I'll try and get to it when I can.

tingxingdong commented 4 years ago

@kpet I used VS2017 debugger to debug simple_test and stop here.

image

tingxingdong commented 4 years ago

release build gives the exact same error as debug build.

image

fodinabor commented 4 years ago

Ok.. that's something pretty different.. And are you sure those are the same issues? The release build one could again result from dll loading.

I'm not sure what could cause the first issue, though... could you try to debug simple_test_static.exe to make sure it's not a dll issue and as this might give you more accurate localization of the error.. At least I can't imagine the shown location to be the actual problematic location..

jrprice commented 4 years ago

We've seen crashes around that location on other platforms, due to vkGetPhysicalDeviceFeatures2 not being supported. Can you check what Vulkan version your GPU driver supports, and whether it supports the VK_KHR_get_physical_device_properties2 instance extension? It might be that we need to use the KHR suffixed version of that function.

You can check this stuff using this program: https://vulkan.gpuinfo.org/download.php

tingxingdong commented 4 years ago

@jrprice I use vulkaninfo to check.

Vulkan Instance Version: 1.2.131

Instance Extensions: count = 11

    VK_EXT_debug_report                    : extension revision 9
    VK_EXT_debug_utils                     : extension revision 1
    VK_EXT_swapchain_colorspace            : extension revision 4
    VK_KHR_device_group_creation           : extension revision 1
    VK_KHR_external_fence_capabilities     : extension revision 1
    VK_KHR_external_memory_capabilities    : extension revision 1
    VK_KHR_external_semaphore_capabilities : extension revision 1
    VK_KHR_get_physical_device_properties2 : extension revision 2
    VK_KHR_get_surface_capabilities2       : extension revision 1
    VK_KHR_surface                         : extension revision 25
    VK_KHR_win32_surface                   : extension revision 6

Layers: count = 10

VK_LAYER_AMD_switchable_graphics (AMD switchable graphics layer) Vulkan version 1.2.131, layer version 1: Layer Extensions: count = 0 Devices: count = 1 GPU id : 0 (Radeon RX 5500) Layer-Device Extensions: count = 0

tingxingdong commented 4 years ago

Do i have to inevitably switch to Linux + AMD (navi RX5500) combination? Has this platform been tested by anybody?

kpet commented 4 years ago

@tingxingdong I believe https://github.com/kpet/clvk/commit/a55e8d4cf3be135e6f6737eca093988701e8db72 that I just pushed should fix the feature initialisation issue that you're seeing. Could you try again please?

tingxingdong commented 4 years ago

@kpet I can first confirm that simple_test does not pass on Ubuntu + AMD RX5500 after I merge into that fix. Still segment fault. The same thing for static.

ldd ./simple_test linux-vdso.so.1 (0x00007fff1fcef000) libOpenCL.so.1 => ./libOpenCL.so.1 (0x00007eff3be70000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007eff3ba7f000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007eff3b860000) libvulkan.so.1 => /home/tim/vulkan/1.2.131.2/x86_64/lib/libvulkan.so.1 (0x00007eff3b60d000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007eff3b405000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007eff3b07c000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007eff3acde000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007eff3aac6000) /lib64/ld-linux-x86-64.so.2 (0x00007eff3c633000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007eff3a8c2000)

====

ERROR: [Loader Message] Code 0 : /opt/amdgpu-pro/lib/i386-linux-gnu/amdvlk32.so: wrong ELF class: ELFCLASS32

VULKANINFO

Vulkan Instance Version: 1.2.131

Instance Extensions: count = 17

    VK_EXT_acquire_xlib_display            : extension revision 1
    VK_EXT_debug_report                    : extension revision 9
    VK_EXT_debug_utils                     : extension revision 1
    VK_EXT_direct_mode_display             : extension revision 1
    VK_EXT_display_surface_counter         : extension revision 1
    VK_KHR_device_group_creation           : extension revision 1
    VK_KHR_display                         : extension revision 23
    VK_KHR_external_fence_capabilities     : extension revision 1
    VK_KHR_external_memory_capabilities    : extension revision 1
    VK_KHR_external_semaphore_capabilities : extension revision 1
    VK_KHR_get_display_properties2         : extension revision 1
    VK_KHR_get_physical_device_properties2 : extension revision 2
    VK_KHR_get_surface_capabilities2       : extension revision 1
    VK_KHR_surface                         : extension revision 25
    VK_KHR_wayland_surface                 : extension revision 6
    VK_KHR_xcb_surface                     : extension revision 6
    VK_KHR_xlib_surface                    : extension revision 6
tingxingdong commented 4 years ago

I see a couple of commits recent days, But after I updated on Win10. I see compilation errors which will prevent to build clspv.exe

image

tingxingdong commented 4 years ago

I tried on Intel Integrated GPU + Win10. I see similar behavior. So I do not think it is the AMD card problem.

tingxingdong commented 4 years ago

image

kpet commented 4 years ago

@tingxingdong I've now merged #187. You may want to retest.

tingxingdong commented 4 years ago

@kpet @jrprice I am able to run static on win10.

$ ./simple_test_static.exe Platform: clvk Device: Radeon RX 5500 Buffer content verified, test passed.

But the non-static simple_test.exe still segment fault, even I copied OpenCL.dll to the folder ,played with LD_LIBRARY_PATH in bash shell, and VS2019 linker, etc.

kpet commented 4 years ago

@tingxingdong Thanks for the report! I've pushed some more fixes to the feature and global initialisation code. I've now got all the tests running on Windows as part of the CI. Could you retest please?

tingxingdong commented 4 years ago

@kpet , I retest on my side. As of April, 14, 2020, simple-test passed! Thanks.

kpet commented 4 years ago

@tingxingdong I'm glad to hear that :). Thanks for retesting!

tingxingdong commented 4 years ago

After i build and run the simple_static.exe, I need to send it to other people's machine installed with vulkan to reproduce my results. "ldd " shows that he and I have the same dependency dll already. However, it just fails on clBuildProgram. I guess because it does not have clspv? (clspv.exe is required or already integrated in the static.exe? ). Or what else I should give to him?

tingxingdong commented 4 years ago

Here I use my own OCL kernel to replace the test helloword-style OCL kernel. The receiver is able to run AMD OpenCL but not clvk with the simple_static.exe I gave to him

image

kpet commented 4 years ago

With the default build options, clvk calls clspv as an external program. The default location for the clspv binary corresponds to where the binary is in the build tree. If you want to reuse built artefacts on another machine, you need to provide the path to the clspv binary via the CLVK_CLSPV_BIN environment variable (see README).

Alternatively, you can build clvk with clspv integrated (see https://github.com/kpet/clvk#clspv-compilation). This means the OpenCL library will be self-contained but applications will likely crash instead of fail when clspv encounters a construct it can't support.

These things are not explained well in the README. I'll try to improve the documentation for this.

tingxingdong commented 4 years ago

@kpet I try the CLVK_CLSPV_BIN environment variable way. Still the same error: Failed to build.

For the other way, integrating clspv in clvk. By setting the -DCLVK_CLSPV_ONLINE_COMPILER=1, I recompile. The build OpenCL.dll is bigger than first way and no clspv.exe produced. The run on my machine is fine. But if when I send to other machine. it gives segment fault.

tingxingdong commented 4 years ago

I see Clspv depends on external projects: Top-of-tree versions of Clang and LLVM SPIRV-Tools SPIRV-Headers

Simply coping clspv.exe (build or fetched from clvk) and sending it other machine is sufficient?

kpet commented 4 years ago

For the other way, integrating clspv in clvk. By setting the -DCLVK_CLSPV_ONLINE_COMPILER=1, I recompile. The build OpenCL.dll is bigger than first way and no clspv.exe produced.

Sounds good :).

The run on my machine is fine. But if when I send to other machine. it gives segment fault.

Could you post a backtrace of the crash? Are you trying to run/compile the same code on both machines?

Simply coping clspv.exe (build or fetched from clvk) and sending it other machine is sufficient?

Yes, the OpenCL library and the clspv binary (depending on whether CLVK_CLSPV_ONLINE_COMPILER is on or off) should be all that you need.

tingxingdong commented 4 years ago

image

kpet commented 4 years ago

It seems to be crashing in the Vulkan loader or implementation. Without symbols it's hard to understand what could be happening. Could you get the backtrace from a debug build please?

tingxingdong commented 4 years ago

debug build always fails on my side.
Error C1083 Cannot open include file: 'clang/Basic/arm_sve_sema_rangechecks.inc': No such file or directory obj.clangSema external\clspv\third_party\llvm\clang\lib\Sema\SemaChecking.cpp 2009

kpet commented 4 years ago

Hmm, even when starting from clean?

tingxingdong commented 4 years ago

I just ask him to install a copy of clvk from scratch and solved the giving away problem. Release build