- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I observed a problem with your new OpenCL runtime ver. 22.
I have an old 32bit application for windows that allows me to detect the OpenCL platforms present in the system and with your new runtime the application throw an exception when the program exits.
I tried to do a very simple test like this:
#include <iostream>
#include "CL/opencl.h"
#include <Windows.h>
int main()
{
cl_uint platformIdCount = 0;
clGetPlatformIDs(0, NULL, &platformIdCount);
std::cout << "Hello World!\n";
return (int)platformIdCount;
}
and I have this exception at the end
This problem is not present with OpenCL runtime ver 21.
Did I do something wrong? Is it a known bug?
I have not found anything about it.
Thanks
Fabiano
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you provide the command you used?
I can build from my end,
// main.cpp
#include <iostream>
#include "CL/cl.h"
#include <Windows.h>
int main()
{
cl_uint platformIdCount = 0;
clGetPlatformIDs(0, NULL, &platformIdCount);
std::cout << "Hello World!\n";
std::cout << (int)platformIdCount << std::endl;
return (int)platformIdCount;
}
I used the below command to build the code and it could work successfully.
> icx main.cpp /I"C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.3\windows\include\sycl" /link "C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.3\windows\lib\x86\intelocl32.lib"
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I compile the test from VisualStudio and I don't link directly the intel lib intelocl32.lib, but the opencl.lib from nvidia SDK
In the list of the dependent modules there are 2 intel dlls loaded: intelocl32.dll and intelocl32_emu.dll
I saw that the problem is present also if I use LoadLibrary
int main()
{
HMODULE hm = LoadLibraryA("OpenCL.dll");
typedef cl_int(CL_API_CALL* PFN_OPENCL_GET_PLATFORM_IDS) (cl_uint, cl_platform_id*, cl_uint*);
PFN_OPENCL_GET_PLATFORM_IDS pfnOpenCLGetPlatformIDs = NULL;
pfnOpenCLGetPlatformIDs = (PFN_OPENCL_GET_PLATFORM_IDS)::GetProcAddress(hm, "clGetPlatformIDs");
if (pfnOpenCLGetPlatformIDs == NULL)
return -1;
// Estraggo le platform disponibili
cl_uint platformIdCount = 0;
pfnOpenCLGetPlatformIDs(0, NULL, &platformIdCount);
FreeLibrary(hm);
std::cout << "Hello World!\n";
return (int)platformIdCount;
}
Thanks
Fabiano
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
With your loadlibrary code, I still can't reproduce your issue. Could you provide your visual studio output log?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We haven't heard back from you for a long time so we are assuming that you have found a solution on your own. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm sorry, but I also opened a ticket and they recommended me a workaround for the problem.
So
Fabiano
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page