cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

ericcarroll
Adept I

No access to second GPGPU without monitor (need a dummy plug)??

In my first post I asked about mixed vendor Linux OpenCl. Not just here, but elsewhere. The resolute silence suggested that what I was trying to do was too cutting edge. Maybe someone knows how to do it, but they are not telling me.

So I dialed it back and went for a fully AMD Proof of Concept. I bought a HD 7870 and added it to an existing mATX rig. The objective is to have the 7870 be a dedicated compute engine. It is running ubuntu 12.04 LTS using AMD flgrx from Catalyst 12.10.

I fought my way through the xorg.conf configuration starting with aticonfig --initial --adapter=all. I had no success until I attached monitors to both cards, then I finally got X to see all the cards, got a screen attached to both cards, and got a working xorg.conf. *whew. That was not a user friendly experience... 

I could see the following openCL devices via clinfo:

  1. HD 7660D - GPU side of the APU - 6 compute units
  2. HD 7870 - 20 compute units
  3. AMD A10-5800K CPU - 4 compute units

clinfo reported correct names, clock speeds, memory and compute unit configuration. I compiled and ran the samples successfully! The test cases clearly showed Devastator and Pitcairn - so this is success. Mandelbrot was impressive. I was able to use the -d flag to run exclusively on the 7870.

Then I rebooted with the monitor disconnected  from the 7870 to run in a production style (not quite headless as yet - the APU still has a monitor attached) using the same xorg.conf. flgrxinfo shows two cards, correctly:

$ fglrxinfo

display:  : 0 screen: 0

OpenGL vendor string: Advanced Micro Devices, Inc.

OpenGL renderer string: AMD Radeon HD 7660D

OpenGL version string: 4.2.11931 Compatibility Profile Context

display: : 0  screen: 1

OpenGL vendor string: Advanced Micro Devices, Inc.

OpenGL renderer string: AMD Radeon HD 7800 Series

OpenGL version string: 4.2.11931 Compatibility Profile Context

$ aticonfig --list-adapters

* 0. 00:01.0 AMD Radeon HD 7660D

  1. 01:00.0 AMD Radeon HD 7800 Series

However, clinfo is very confused, reporting two GPUs as expected, but that both GPUs are Devastator devices (?!?) both with six compute engines. It looks like it has confused the A10 APU into OpenCL device 2 which was previously the 7870. Running the samples also showed two Devastator devices reported unlike before.

So, my question is, do I really need to attach a VGA dummy dongle to fool the card into thinking a monitor is attached? Any way around this? This is a pretty serious kludge to have to have a fake monitor attached.

Any feedback would be welcome on how to resolve this.

Confused clinfo:

Number of platforms:  

  1
  Platform Profile:  

  FULL_PROFILE
  Platform Version:  

  OpenCL 1.2 AMD-APP (1113.2)
  Platform Name:  

  AMD Accelerated Parallel Processing
  Platform Vendor:  

  Advanced Micro Devices, Inc.
  Platform Extensions:  

  cl_khr_icd cl_amd_event_callback cl_amd_offline_devices

  Platform Name:  

  AMD Accelerated Parallel Processing
Number of devices:  

  3
  Device Type:  


  CL_DEVICE_TYPE_GPU
  Device ID:  


  4098
  Board name:  


  AMD Radeon HD 7660D
  Device Topology:  

  PCI[ B#1, D#0, F#0 ]
  Max compute units:  

  6
  Max work items dimensions:  
  3

Max work items[0]:  

  256

Max work items[1]:  

  256

Max work items[2]:  

  256
  Max work group size:  

  256
  Preferred vector width char:  
  16
  Preferred vector width short:  
  8
  Preferred vector width int:  
  4
  Preferred vector width long:  
  2
  Preferred vector width float:  
  4
  Preferred vector width double:     0
  Native vector width char:  
  16
  Native vector width short:  
  8
  Native vector width int:  
  4
  Native vector width long:  
  2
  Native vector width float:  
  4
  Native vector width double:  
  0
  Max clock frequency:  

  1000Mhz
  Address bits:  


  32
  Max memory allocation:  
  134217728
  Image support:  

  Yes
  Max number of images read arguments:     128
  Max number of images write arguments:     8
  Max image 2D width:  

  16384
  Max image 2D height:  

  16384
  Max image 3D width:  

  2048
  Max image 3D height:  

  2048
  Max image 3D depth:  

  2048
  Max samplers within kernel:  
  16
  Max size of kernel argument:  
  1024
  Alignment (bits) of base address:     2048

  Minimum alignment (bytes) for any datatype:     128

  Single precision floating point capability


Denorms:  


  No

Quiet NaNs:  


  Yes

Round to nearest even:  
  Yes

Round to zero:  

  Yes

Round to +ve and infinity:  
  Yes

IEEE754-2008 fused multiply-add:     Yes
  Cache type:  


  None
  Cache line size:  

  0
  Cache size:  


  0
  Global memory size:  

  268435456
  Constant buffer size:  

  65536
  Max number of constant args:  
  8
  Local memory type:  

  Scratchpad
  Local memory size:  

  32768

  Kernel Preferred work group size multiple:     64

  Error correction support:  
  0
  Unified memory for Host and Device:     1
  Profiling timer resolution:  
  1
  Device endianess:  

  Little
  Available:  


  Yes
  Compiler available:  

  Yes
  Execution capabilities:  



Execute OpenCL kernels:  
  Yes

Execute native function:  
  No
  Queue properties:  



Out-of-Order:  

  No

Profiling :  


  Yes
  Platform ID:  


  0x00007fbb638774e0
  Name:  



  Devastator
  Vendor:  


  Advanced Micro Devices, Inc.
  Device OpenCL C version:  
  OpenCL C 1.2
  Driver version:  

  1113.2
  Profile:  


  FULL_PROFILE
  Version:  


  OpenCL 1.2 AMD-APP (1113.2)
  Extensions:  


  cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_atomic_counters_32 cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_popcnt

  Device Type:  


  CL_DEVICE_TYPE_GPU
  Device ID:  


  4098
  Board name:  


  AMD Radeon HD 7660D
  Device Topology:  

  PCI[ B#1, D#0, F#0 ]
  Max compute units:  

  6
  Max work items dimensions:  
  3

Max work items[0]:  

  256

Max work items[1]:  

  256

Max work items[2]:  

  256
  Max work group size:  

  256
  Preferred vector width char:  
  16
  Preferred vector width short:  
  8
  Preferred vector width int:  
  4
  Preferred vector width long:  
  2
  Preferred vector width float:  
  4
  Preferred vector width double:     0
  Native vector width char:  
  16
  Native vector width short:  
  8
  Native vector width int:  
  4
  Native vector width long:  
  2
  Native vector width float:  
  4
  Native vector width double:  
  0
  Max clock frequency:  

  1000Mhz
  Address bits:  


  32
  Max memory allocation:  
  134217728
  Image support:  

  Yes
  Max number of images read arguments:     128
  Max number of images write arguments:     8
  Max image 2D width:  

  16384
  Max image 2D height:  

  16384
  Max image 3D width:  

  2048
  Max image 3D height:  

  2048
  Max image 3D depth:  

  2048
  Max samplers within kernel:  
  16
  Max size of kernel argument:  
  1024
  Alignment (bits) of base address:     2048

  Minimum alignment (bytes) for any datatype:     128

  Single precision floating point capability


Denorms:  


  No

Quiet NaNs:  


  Yes

Round to nearest even:  
  Yes

Round to zero:  

  Yes

Round to +ve and infinity:  
  Yes

IEEE754-2008 fused multiply-add:     Yes
  Cache type:  


  None
  Cache line size:  

  0
  Cache size:  


  0
  Global memory size:  

  268435456
  Constant buffer size:  

  65536
  Max number of constant args:  
  8
  Local memory type:  

  Scratchpad
  Local memory size:  

  32768

  Kernel Preferred work group size multiple:     64

  Error correction support:  
  0
  Unified memory for Host and Device:     1
  Profiling timer resolution:  
  1
  Device endianess:  

  Little
  Available:  


  Yes
  Compiler available:  

  Yes
  Execution capabilities:  



Execute OpenCL kernels:  
  Yes

Execute native function:  
  No
  Queue properties:  



Out-of-Order:  

  No

Profiling :  


  Yes
  Platform ID:  


  0x00007fbb638774e0
  Name:  



  Devastator
  Vendor:  


  Advanced Micro Devices, Inc.
  Device OpenCL C version:  
  OpenCL C 1.2
  Driver version:  

  1113.2
  Profile:  


  FULL_PROFILE
  Version:  


  OpenCL 1.2 AMD-APP (1113.2)
  Extensions:  


  cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_atomic_counters_32 cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_popcnt

  Device Type:  


  CL_DEVICE_TYPE_CPU
  Device ID:  


  4098
  Board name:  



  Max compute units:  

  4
  Max work items dimensions:  
  3

Max work items[0]:  

  1024

Max work items[1]:  

  1024

Max work items[2]:  

  1024
  Max work group size:  

  1024
  Preferred vector width char:  
  16
  Preferred vector width short:  
  8
  Preferred vector width int:  
  4
  Preferred vector width long:  
  2
  Preferred vector width float:  
  8
  Preferred vector width double:     4
  Native vector width char:  
  16
  Native vector width short:  
  8
  Native vector width int:  
  4
  Native vector width long:  
  2
  Native vector width float:  
  8
  Native vector width double:  
  4
  Max clock frequency:  

  1400Mhz
  Address bits:  


  64
  Max memory allocation:  
  4064316416
  Image support:  

  Yes
  Max number of images read arguments:     128
  Max number of images write arguments:     8
  Max image 2D width:  

  8192
  Max image 2D height:  

  8192
  Max image 3D width:  

  2048
  Max image 3D height:  

  2048
  Max image 3D depth:  

  2048
  Max samplers within kernel:  
  16
  Max size of kernel argument:  
  4096
  Alignment (bits) of base address:     1024

  Minimum alignment (bytes) for any datatype:     128

  Single precision floating point capability


Denorms:  


  Yes

Quiet NaNs:  


  Yes

Round to nearest even:  
  Yes

Round to zero:  

  Yes

Round to +ve and infinity:  
  Yes

IEEE754-2008 fused multiply-add:     Yes
  Cache type:  


  Read/Write
  Cache line size:  

  64
  Cache size:  


  16384
  Global memory size:  

  16257265664
  Constant buffer size:  

  65536
  Max number of constant args:  
  8
  Local memory type:  

  Global
  Local memory size:  

  32768

  Kernel Preferred work group size multiple:     1

  Error correction support:  
  0
  Unified memory for Host and Device:     1
  Profiling timer resolution:  
  1
  Device endianess:  

  Little
  Available:  


  Yes
  Compiler available:  

  Yes
  Execution capabilities:  



Execute OpenCL kernels:  
  Yes

Execute native function:  
  Yes
  Queue properties:  



Out-of-Order:  

  No

Profiling :  


  Yes
  Platform ID:  


  0x00007fbb638774e0
  Name:  



  AMD A10-5800K APU with Radeon(tm) HD Graphics 
  Vendor:  


  AuthenticAMD
  Device OpenCL C version:  
  OpenCL C 1.2
  Driver version:  

  1113.2 (sse2,avx,fma4)
  Profile:  


  FULL_PROFILE
  Version:  


  OpenCL 1.2 AMD-APP (1113.2)
  Extensions:  


  cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_device_fission cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_popcnt

Xorg.conf:

Section "ServerLayout"

    Identifier     "amdcccle Layout"

    Screen      0  "aticonfig-Screen[0]-0" 0 0

    Screen         "aticonfig-Screen[1]-0" 2720 0

EndSection

Section "Module"

    Load  "glx"

EndSection

Section "Monitor"

    Identifier   "1-DFP0"

    Option        "VendorName" "ATI Proprietary Driver"

    Option        "ModelName" "Generic Autodetecting Monitor"

    Option        "DPMS" "true"

    Option        "PreferredMode" "1920x1080"

    Option        "TargetRefresh" "60"

    Option        "Position" "0 0"

    Option        "Rotate" "normal"

    Option        "Disable" "false"

EndSection

Section "Monitor"

    Identifier   "1-CRT0"

    Option        "VendorName" "ATI Proprietary Driver"

    Option        "ModelName" "Generic Autodetecting Monitor"

    Option        "DPMS" "true"

    Option        "PreferredMode" "1024x768"

    Option        "TargetRefresh" "60"

    Option        "Position" "1920 312"

    Option        "Rotate" "normal"

    Option        "Disable" "false"

EndSection

Section "Monitor"

    Identifier   "0-DFP1"

    Option        "VendorName" "ATI Proprietary Driver"

    Option        "ModelName" "Generic Autodetecting Monitor"

    Option        "DPMS" "true"

    Option        "PreferredMode" "1920x1080"

    Option        "TargetRefresh" "60"

    Option        "Position" "0 0"

    Option        "Rotate" "normal"

    Option        "Disable" "false"

EndSection

Section "Monitor"

    Identifier   "0-CRT1"

    Option        "VendorName" "ATI Proprietary Driver"

    Option        "ModelName" "Generic Autodetecting Monitor"

    Option        "DPMS" "true"

    Option        "PreferredMode" "800x600"

    Option        "TargetRefresh" "60"

    Option        "Position" "1920 0"

    Option        "Rotate" "normal"

    Option        "Disable" "false"

EndSection

Section "Monitor"

    Identifier   "1-DFP5"

    Option        "VendorName" "ATI Proprietary Driver"

    Option        "ModelName" "Generic Autodetecting Monitor"

    Option        "DPMS" "true"

    Option        "PreferredMode" "1400x1050"

    Option        "TargetRefresh" "60"

    Option        "Position" "0 0"

    Option        "Rotate" "normal"

    Option        "Disable" "false"

EndSection

Section "Device"

    Identifier  "aticonfig-Device[0]-0"

    Driver      "fglrx"

    Option        "Monitor-DFP1" "0-DFP1"

    Option        "Monitor-CRT1" "0-CRT1"

    BusID       "PCI:0:1:0"

EndSection

Section "Device"

    Identifier  "aticonfig-Device[1]-0"

    Driver      "fglrx"

    Option        "Monitor-DFP5" "1-DFP5"

    BusID       "PCI:1:0:0"

EndSection

Section "Device"

    Identifier  "amdcccle-Device[0]-1"

    Driver      "fglrx"

    Option        "Monitor-CRT1" "0-CRT1"

    BusID       "PCI:0:1:0"

    Screen      1

EndSection

Section "Screen"

    Identifier "aticonfig-Screen[0]-0"

    Device     "aticonfig-Device[0]-0"

    DefaultDepth     24

    SubSection "Display"

        Viewport   0 0

        Virtual   2944 2944

        Depth     24

    EndSubSection

EndSection

Section "Screen"

    Identifier "aticonfig-Screen[1]-0"

    Device     "aticonfig-Device[1]-0"

    DefaultDepth     24

    SubSection "Display"

        Viewport   0 0

        Depth     24

    EndSubSection

EndSection

Section "Screen"

    Identifier "amdcccle-Screen[0]-1"

    Device     "amdcccle-Device[0]-1"

    DefaultDepth     24

    SubSection "Display"

        Viewport   0 0

        Depth     24

    EndSubSection

EndSection

0 Likes
1 Solution

Hi Eric,

Well at my end, I was able to setup a completely headless configuration. I had seen the confused clinfo error when i installed 12.10 driver, but not with 13.1 driver.

Additional steps I had to do to make the system totally headless are in the attached pdf. This is actually a AMD release pdf, but I do not have its link. (so just attching here ).  Although I was still not able to get my hands at a 7xxx card. Will do that ASAP.

The workaround for ubuntu mentioned in the document is outdated.

            It says add :

            xhost +

chmod uog+rw /dev/ati/card*

to /etc/gdm/Init/default

This will not work because ubuntu is currently using lightdm as display-manager instead of gdm. This change has happened since ubuntu 11.10 (oct, 2011)

The new method I suggest, would be adding the below line to /etc/lightdm/lightdm.conf

display-setup-script="/absolute/path/to/the/script.sh"

Now add:

xhost +

chmod uog+rw /dev/ati/card*

to "/absolute/path/to/the/script.sh" and run chmod ugo+x on this file.

View solution in original post

0 Likes
13 Replies
himanshu_gautam
Grandmaster

I will try the setup and let you know if it is possible to run your setup with out any monitors connected. Thanks for your patience.

0 Likes

I will try the setup and let you know if it is possible to run your setup with out any monitors connected.

In order of priority, please check if the 7870 can be identified by clinfo properly without a monitor attached, but with a monitor attached to the APU monitor port. If that can be made to work, the next question is whether both cards can be disconnected.

In the meantime I will build a VGA dummy plug and see if that helps.

I did notice that xrandr reported screen 1 CRT1 (HD 7870) being up even without a monitor connected. But I still got the confused result from clinfo where the APU GPU was reported twice.

I spent more time with aticonfig command line options but did not see anything that might impact this.

Thanks for any help as this one has stumped me. I am wondering if it is a driver or opencl bug.

Eric

Hi Eric,

Good News. I was able to work on a headless discrete GPU, when display was being driven by an iGPU.

I was also seeing the same confusing issue, you mentioned with 12.10 driver. clinfo was showing the iGPU 2 times. Although as per my colleagues that configuration should also work fine. Will dig in more tomorrow.

For now, I was able to run OpenCL samples on a HD 6570 when no cable was connected to it.

A few important pointers:

1. Make iGPU as primary video adapter using BIOS settings.

2. Do a clean driver install.

3. Do aticonfig --adapter=all --initial

4. Do export DISPLAY=:0

5. Reboot.

Will try using just a ssh terminal on this system tomorrow.

0 Likes

Thank you for your efforts on this.

I am a bit confused by your response. You mean clinfo and running samples works with a HD 6570 with the APU but not with a HD 7870?

I checked my BIOS and it is set for the IGPU as primary. I was definitely doing DISPLAY, and xorg from -adapter-all.

I will try a clean reinstall of the package rather than the upgrade I did and redo the xorg.conf and post back here.

0 Likes

Sadly, no joy.

Clean reinstall of fglrx, regenerated xorg.conf, BIOS checked. Monitor attached to APU VGA, not to 7870.

I have attached the output from aticonfig --lsa ; fglrxinfo ; clinfo  in clinfo.out and xorg.conf

Note the second GPU is still wrong - lists 7660D twice instead of 7660D and 7870.

This is looking like a driver bug of some kind. OpenCL or flgrx, I am not sure.

I am stumped now. Any suggestions welcome.

0 Likes

sorry. could not arrange a 7870 yesterday. I will try to get one today.

It might be a hardware specific issue. Will let you know.

0 Likes

Thanks for looking into it. Please let me know what your findings are.

0 Likes

Hi,

Is there any update on the possibility of using a A10 IGP with monitor and 7870 without a monitor or both without monitor? I am at a dead end on this.

Thanks.

0 Likes

Hi Eric,

Well at my end, I was able to setup a completely headless configuration. I had seen the confused clinfo error when i installed 12.10 driver, but not with 13.1 driver.

Additional steps I had to do to make the system totally headless are in the attached pdf. This is actually a AMD release pdf, but I do not have its link. (so just attching here ).  Although I was still not able to get my hands at a 7xxx card. Will do that ASAP.

The workaround for ubuntu mentioned in the document is outdated.

            It says add :

            xhost +

chmod uog+rw /dev/ati/card*

to /etc/gdm/Init/default

This will not work because ubuntu is currently using lightdm as display-manager instead of gdm. This change has happened since ubuntu 11.10 (oct, 2011)

The new method I suggest, would be adding the below line to /etc/lightdm/lightdm.conf

display-setup-script="/absolute/path/to/the/script.sh"

Now add:

xhost +

chmod uog+rw /dev/ati/card*

to "/absolute/path/to/the/script.sh" and run chmod ugo+x on this file.

0 Likes

Great news, thanks for the followup.

I understand how to get headless operation to work in theory. The roadblock was the card not getting correctly recognized by clinfo without a monitor and thus not being useable by OpenCL. 

The driver version appears to be the source of the clinfo issue based on your investigation.

Can you confirm for me that Catalyst 13.1 depends on xorg 1.12? If so this should work fine with ubuntu 12.04.

I will try the upgrade tomorrow and let you know if this resolves the issue.

0 Likes

Checked with a HD 7700 and that too works fine in headless config.

0 Likes

Got it working! clinfo now sees the two GPUs with correct stream processor dimensioning without a monitor on the 7870.

The resolution was to upgrade the driver to Catalyst 13.1. The root cause for the 7870 not running with OpenCL correctly was Catalyst 12.10.


Thanks very much for the help. On to actual testing...

Hi Eric,

Thanks for confirming that. I will try to setup the AMD + NVIDIA setup now. I will update the relevant thread, when i make some progress.

0 Likes