UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
4,489 Views
Registered: ‎04-17-2012

Error: call to clGetDeviceIDs() returns CL_DEVICE_NOT_FOUND

I am using SDAccel and am trying to execute the example code "matrix_multiply_cl_kernel" in the alpha-data card.

 

  • For doing so, I run "sdaccel example_alphadata.tcl" with no problems.
  • Then install driver and set the environment following this guide (v2015.03): SDAccel Development Environment: Tutorial
  • I checked if the alpha-data card is detected by Linux (the firmware was already installed):
$ lspci -v

01:00.0 Memory controller: Xilinx Corporation Device 7038
	Subsystem: Xilinx Corporation Device 0010
	Flags: bus master, fast devsel, latency 0, IRQ 129
	Memory at df000000 (32-bit, non-prefetchable) [size=4M]
	Memory at df400000 (32-bit, non-prefetchable) [size=1M]
	Capabilities: <access denied>
	Kernel driver in use: xdma
	Kernel modules: xdma
  • After that I got the XILINX_OPENCL and LD_LIBRARY_PATH variables set to specific values. The problem appears during execution (under <solution>/pkg/pcie/):

 

$ ./example_alpha.exe mmult1.xclbin 
CL_PLATFORM_VENDOR Xilinx
CL_PLATFORM_NAME Xilinx
Error: Failed to create a device group!
Test failed
Segmentation fault (core dumped)

 

 

  •  Debugging the application, I found that the it fails calling clGetDeviceIDs(), because it returns -1 which means CL_DEVICE_NOT_FOUND.

 

...
  // Connect to a compute device
  //
  int fpga = 0;
#if defined (FPGA_DEVICE)
  fpga = 1;
#endif
  err = clGetDeviceIDs(platform_id, fpga ? CL_DEVICE_TYPE_ACCELERATOR : CL_DEVICE_TYPE_CPU,
                       1, &device_id, NULL);
  if (err != CL_SUCCESS)
  {
    printf("Error: Failed to create a device group!\n");
    printf("Test failed\n");
    return EXIT_FAILURE;
  }
...

 

I also tried other Xilinx examples and they fail executing clGetDeviceIDs(). I revised other forums and many people solve clGetDeviceIDs()-related issues by (1) finding the number of platforms in the system and (2) choosing the right one to work with.

However, I have verified with clGetPlatformIDS(), that I have only the Xilinx platform in my system.

 

Is there anything I am missing?

 

Any suggestion will be welcome!

 

Leonardo

 

 


Best,
L30nardo SV
0 Kudos
2 Replies
Newbie qiaofei
Newbie
4,386 Views
Registered: ‎12-16-2015

Re: Error: call to clGetDeviceIDs() returns CL_DEVICE_NOT_FOUND

Hi~

 

I just got the exactly same problem with you and still have no idea. Have you figured out any solutions?

 

Best wishes,

Fei Qiao

0 Kudos
Contributor
Contributor
4,124 Views
Registered: ‎04-17-2012

Re: Error: call to clGetDeviceIDs() returns CL_DEVICE_NOT_FOUND

Hi,

 

I still have the same problem.

 

I was told to re-installed the generated firmware (located in /pkg/pcie) but it doesn't work.

 

I was thinking, the problem is the host OS.

I am using Fedora. What about you?

 

Leo


Best,
L30nardo SV
0 Kudos