cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

selva_c
Journeyman III

BUG: wrong device_id from clGetDeviceIDsFromD3D10KHR on SandyBridge + RADEON GPU.

I'm testing behavior of clGetDeviceIDsFromD3D10KHR.

my PC's environment is Core i5-2400 CPU on the H67 mother board and RADEON HD 5700 Series GPU.

 I got wrong device_id from clGetDeviceIDsFromD3D10KHR, when display output is SandyBridge.

I created "d3d10 device" on sandy bridge, but CL_DEVICE_TYPE of the device_id which from clGetDeviceIDsFromD3D10KHR was GPU.

How to get correct device_id from clGetDeviceIDsFromD3D10KHR ?

0 Likes
16 Replies
selva_c
Journeyman III

of course, I set the parameter that correct ID3D10Device pointer and CL_PREFERRED_DEVICES_FOR_D3D10_KHR to clGetDeviceIDsFromD3D10KHR.

0 Likes

Can you please share some code snippet. IMHO clGetDeviceIDsFromD3D10KHR will return a cl_device_id for a device which is already selected using directx.

Are you sure you have selected the HD5700 device at that point?

0 Likes

Originally posted by: himanshu.gautam Can you please share some code snippet. IMHO clGetDeviceIDsFromD3D10KHR will return a cl_device_id for a device which is already selected using directx.

Are you sure you have selected the HD5700 device at that point?

this probrem was happend by PC's environment, so I think that don't have to share snippet. (sorry..)

I think wrong parameter, because I created ID3D10device on CPU (Internal GPU on SandyBridge) and gotten device_id from clGetDeviceIDsFromD3D10KHR pointed to RADEON HD 57xxx.

I think that correct device_id from clGetDeviceIDsFromD3D10KHR pointed to CPU (Internal GPU on SandyBridge).

0 Likes

SimpleDx10 in Sample Code has same probrem.

this program executed on the target environment, then black screen in the window.

0 Likes

I am not sure if AMD APP SDK should be able to work properly with internal GPU on sandybridge.

Also intel CPU(+GPU) and HD57xx should be in different platforms so different contexts. Its odd if they are migleing with each other.

Can you check if smpleDx10 works on a fusions device for you.

0 Likes

Originally posted by: himanshu.gautam I am not sure if AMD APP SDK should be able to work properly with internal GPU on sandybridge.

Also intel CPU(+GPU) and HD57xx should be in different platforms so different contexts. Its odd if they are migleing with each other.

I think so. I want AMD to repair this probrem and make D3D10 interop API correct that return error if can't interop with sandy internal GPU, or return correct handle if can interop with it.

samely, I tryed to get handle from clCreateContextFromType with CL_CONTEXT_D3D10_DEVICE_KHR param and CL_DEVICE_TYPE_ALL flag, then I got GPU context too.

Can you check if smpleDx10 works on a fusions device for you.

I dont have a fusions device...

0 Likes

are they any AMD's suff that see this forums ??

0 Likes

selva_c,

 

cl_context clCreateContextFromType (cl_context_properties   *properties

From spec,context creation takes context_properties as parameter which takes the platform. So even if you do CL_DEVICE_TYPE_ALL, either of the AMD GPU or intel GPU will be selected based on the platform.

Can you please explain, how you do it.

 

0 Likes

Originally posted by: himanshu.gautam selva_c,

 

cl_context clCreateContextFromType (cl_context_properties   *properties

From spec,context creation takes context_properties as parameter which takes the platform. So even if you do CL_DEVICE_TYPE_ALL, either of the AMD GPU or intel GPU will be selected based on the platform.

Can you please explain, how you do it.

 

I set to clCreateContextFromType bellow.

  • CL_CONTEXT_PLATFORM: AMD OpenCL platform
  • CL_CONTEXT_D3D10_DEVICE_KHR: ID3D10Device from intel GPU
  • device_type: CL_DEVICE_TYPE_ALL

AMD OpenCL platform recognized intel GPU as CPU device, and it has cl_khr_d3d10_sharing in CL_DEVICE_EXTENSIONS.

so, I think that context creation should return intel GPU context, because I set "CL_CONTEXT_D3D10_DEVICE_KHR: ID3D10Device from intel GPU".

as a test, I set CL_DEVICE_TYPE_CPU, then I got a correct interop. sample app: "SimpleDx10" had correct display, too.

(sorry for poor english, case I'm japanese...)

0 Likes

does anyones know how to correct this probrem ??

0 Likes

why no action are there ?

0 Likes

 

0 Likes

selva_c,

Can you please explain how an opencl implementation can select intel's device if the platform supplied to it is AMD's.It should most probably select your HD57xx device.

You say simpleDX10 also gives the same error. Did you modified it to give intel's device id?

Also AFAIK it is not possible to run any code on Intel's sandybridge GPU(you may be able to run on the CPU, but it is also not tested) with AMD APP SDK and Intel's OpenCL SDK must be used.

 

0 Likes

So you used DirectX to get a device ID for Intel's GPU.

You then passed this to the APP runtime?

If that's the case I would expect the runtime to notice that the device ID is not a DX10 device that it knows about and report an error accordingly. However, that's only going to be possible if there's a way to tell. It might be a bug if it's carrying on regardless and not returning an error code.

Is that the situation you're referring to?

0 Likes

Originally posted by: LeeHowes So you used DirectX to get a device ID for Intel's GPU.

You then passed this to the APP runtime?

If that's the case I would expect the runtime to notice that the device ID is not a DX10 device that it knows about and report an error accordingly. However, that's only going to be possible if there's a way to tell. It might be a bug if it's carrying on regardless and not returning an error code.

Is that the situation you're referring to?

 

Yes, it is.

 I always got CL_SUCCESS from clGetDeviceIDsFromD3D10KHR(), clCreateContext() and clCreateContextFromType() with ID3D10Device which created on SandyBridge's Device.

But, I didn't D3D10 interop as a result.

0 Likes

Originally posted by: selva_c  

 

Yes, it is.

 

 I always got CL_SUCCESS from clGetDeviceIDsFromD3D10KHR(), clCreateContext() and clCreateContextFromType() with ID3D10Device which created on SandyBridge's Device.

 

But, I didn't D3D10 interop as a result.

 

What is the value of num_devices(last parameter) of  clGetDeviceIDsFromD3D10KHR()?

If it is zero, then SDK is doing as expected.

0 Likes