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