cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

octoboar
Adept I

OpenCL/ADL get stuck with Windows 10 Remote Desktop (RDP)

This affects mining and other compute workloads.

1. Connect with RDP to a PC: 1) with AMD GPUs 2) and Windows 10.

2. Start a watchdogged compute workload (try any AMD crypto miner + a script that restarts the miner when its process exits).

3. Disconnect RDP.

4. The miner works, but a new compute task won't be able to start.

5. Simulate compute workload "crash": taskkill /f /im miner.exe the crypto miner through the SSH in Windows 10.

6. Watchdog script will start the miner process again, but the miner gets stuck somewhere in OpenCL and/or ADL calls.

7. Login through RDP again and the miner will get unstuck and proceed to mining.

 

I've seen something about XDDM -> WDDM RDP driver change in Windows 10 that might be causing this. NVIDIA is not affected.

0 Likes
4 Replies
octoboar
Adept I

A simpler minimal example:

1. Log in via RDP

2. Powershell: start-sleep -s 5; clinfo

3. Quickly disconnect RDP

5. clinfo will hang and wait until you connect via RDP/physical screen again

0 Likes

Output of:

dxdiag.exe /whql:off /dontskip /x log.txt

RDP disconnected vs RDP connected:

https://www.diffchecker.com/cG2ejE6J

 

Looks like RDP disables integrated Intel card (connected to monitor). However, AMD cards are not connected to displays and it isn't obvious why they might be affected.

0 Likes

A trick: I find out at what point clinfo hangs:

 

write-host "hello"; start-sleep -s 5; start-process -nonewwindow powershell {start-sleep -s 15; write-host "--------------------------";}; clinfo;

 

 

It hangs on the first AMD GPU available in OpenCL, while getting` Kernel preferref work group size multiple (and probably some later lines in one shot):

 

  Platform Name:                                 AMD Accelerated Parallel Processing
Number of devices:                               3
  Device Type:                                   CL_DEVICE_TYPE_GPU
  Vendor ID:                                     1002h
  Board name:                                    Radeon RX 580 Series
  Device Topology:                               PCI[ B#14, D#0, F#0 ]
  Max compute units:                             36
  Max work items dimensions:                     3
    Max work items[0]:                           1024
    Max work items[1]:                           1024
    Max work items[2]:                           1024
  Max work group size:                           256
  Preferred vector width char:                   4
  Preferred vector width short:                  2
  Preferred vector width int:                    1
  Preferred vector width long:                   1
  Preferred vector width float:                  1
  Preferred vector width double:                 1
  Native vector width char:                      4
  Native vector width short:                     2
  Native vector width int:                       1
  Native vector width long:                      1
  Native vector width float:                     1
  Native vector width double:                    1
  Max clock frequency:                           1340Mhz
  Address bits:                                  64
  Max memory allocation:                         8321499136
  Image support:                                 Yes
  Max number of images read arguments:           128
  Max number of images write arguments:          64
  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:                                    Read/Write
  Cache line size:                               64
  Cache size:                                    16384
  Global memory size:                            8589934592
  Constant buffer size:                          8321499136
  Max number of constant args:                   8
  Local memory type:                             Scratchpad
  Local memory size:                             32768
  Max pipe arguments:                            16
  Max pipe active reservations:                  16
  Max pipe packet size:                          4026531840
  Max global variable size:                      7489349120
  Max global variable preferred total size:      8589934592
  Max read/write image args:                     64
  Max on device events:                          1024
  Queue on device max size:                      8388608
  Max on device queues:                          1
  Queue on device preferred size:                262144
  SVM capabilities:
    Coarse grain buffer:                         Yes
    Fine grain buffer:                           Yes
    Fine grain system:                           No
    Atomics:                                     No
  Preferred platform atomic alignment:           0
  Preferred global atomic alignment:             0
  Preferred local atomic alignment:              0
--------------------------
  Kernel Preferred work group size multiple:     64
  Error correction support:                      0
  Unified memory for Host and Device:            0
  Profiling timer resolution:                    1
  Device endianess:                              Little
  Available:                                     Yes
  Compiler available:                            Yes
  Execution capabilities:
    Execute OpenCL kernels:                      Yes
    Execute native function:                     No
  Queue on Host properties:
    Out-of-Order:                                No
    Profiling :                                  Yes
  Queue on Device properties:
    Out-of-Order:                                Yes
    Profiling :                                  Yes
  Platform ID:                                   00007FFDEB8D9490
  Name:                                          Ellesmere
  Vendor:                                        Advanced Micro Devices, Inc.
  Device OpenCL C version:                       OpenCL C 2.0
  Driver version:                                3188.4
  Profile:                                       FULL_PROFILE
  Version:                                       OpenCL 2.0 AMD-APP (3188.4)
  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_fp16 cl_khr_gl_sharing cl_khr_gl_depth_images cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_dx9_media_sharing cl_khr_image2d_from_buffer cl_khr_spir cl_khr_subgroups cl_khr_gl_event cl_khr_depth_images cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_amd_liquid_flash cl_amd_planar_yuv

 

 

 

0 Likes

This seems to be fixed by changing a RDP setting in Local Group Policy Editor gpedit.exe:

Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Remote Session Environment:

Use WDDM graphics display driver for Remote Desktop Connections = Disabled.

Looks like AMD driver does not like the new WDDM remote desktop driver in Windows 10 1903. Disconnecting from remote desktop session then causes hangs in OpenDL device enumeration.

Here is the list of what Microsoft has removed from Windows 10 1903: 

XDDM-based remote display driver

 

0 Likes