From owner-freebsd-questions@freebsd.org Fri Jan 4 23:21:26 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F552143DF59; Fri, 4 Jan 2019 23:21:26 +0000 (UTC) (envelope-from tomek.cedro@gmail.com) Received: from mail-ua1-x934.google.com (mail-ua1-x934.google.com [IPv6:2607:f8b0:4864:20::934]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1ACAE897D8; Fri, 4 Jan 2019 23:21:25 +0000 (UTC) (envelope-from tomek.cedro@gmail.com) Received: by mail-ua1-x934.google.com with SMTP id v24so12483211uap.13; Fri, 04 Jan 2019 15:21:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cedro.info; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=milXFhpdLzIBhKY8wocvo4TFsO+jBbHOfWeR6Qlyf6s=; b=iolSAJRBgerPnWItccG8VI7ZsnrhwTFYalq8q6+ZdKO7A+2sRDgTFWVIXAJSnw5Mdf My1KCr2bTtuTYuYhyGTxhjIHRPJQIo7n0anak6VSl57/sLOOLNj38ZMFZxiHmI1O4Ar5 weA+TMu8eN2e5FOT/l1/HfYL9f3l3Kq8M/rZrG6GdqUgwyF/TG+fDkEsphMpJFsyYwg6 upMqvqiCsMfScgZFPXgyPvnNWIN9sbUZx8TXKMwHtfZiVxtRIciuRrMV29v2YxEp3xr0 clhHgybH647NHbM8Tf7b20dRBDI4aUw/Pb3su5DQGoSQz6HpDhRM3VmK2rlTm/iueWPt lzhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=milXFhpdLzIBhKY8wocvo4TFsO+jBbHOfWeR6Qlyf6s=; b=HW9goaUzwZtmPIzbuqoaXBJx/WA1zIzZQFHTNHaJbwV13znhnQVrXgxsLCCzJncOHV xbbYjDJm6YxUKYED7bVqzMxt767nm9d9WASTRl3so6cHScIaNySDxSaODHRQvflPksc/ 5h9NpAT3noEGFEJUBmF4Ek6qJJPFuKoq7A0ELktn5gL/KDOMYEdKZIDJy+x7lXqM/q5V +CFsE308YcrEI20OjcHHWrSaMgWFXW/HutwfyXaShLh6XFbBF9LlHEWzDmErQIAdd+vk fPEY/tIor8h24PxL+6ZpqtBH3MLXaQaweSPXQHG+mSTmrEuhh7kxziR6j6aXUXq4BiGz RH+w== X-Gm-Message-State: AJcUukdEgXF5xv3iuTThvf4cTaJUHLr4XqjCAUskXqTYQEEMM2sPCnuP /bRhVS9feBrL0Gia0rn6HyGSdDF2Ggdxj9WXoJ8= X-Google-Smtp-Source: ALg8bN4yVxA7ZBHpNVSb4p1YnYyaCKf7HePiDTxzIo8PbweV1I0/L/11PfAOpN7h9z0hZydGBG56stGIasX0j2Ex/HU= X-Received: by 2002:ab0:6652:: with SMTP id b18mr10346130uaq.46.1546644084246; Fri, 04 Jan 2019 15:21:24 -0800 (PST) MIME-Version: 1.0 References: <1546427653.1787.0@smtp.migadu.com> In-Reply-To: <1546427653.1787.0@smtp.migadu.com> From: Tomasz CEDRO Date: Sat, 5 Jan 2019 00:21:21 +0100 Message-ID: Subject: Re: AMDGPU RX580 OpenCL To: Greg V Cc: FreeBSD Questions Mailing List , freebsd-x11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 1ACAE897D8 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cedro.info header.s=google header.b=iolSAJRB; spf=pass (mx1.freebsd.org: domain of tomekcedro@gmail.com designates 2607:f8b0:4864:20::934 as permitted sender) smtp.mailfrom=tomekcedro@gmail.com X-Spamd-Result: default: False [-3.87 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.988,0]; R_DKIM_ALLOW(-0.20)[cedro.info:s=google]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-0.99)[-0.994,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[cedro.info]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[cedro.info:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[4.3.9.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.89)[-0.891,0]; IP_SCORE(-0.79)[ipnet: 2607:f8b0::/32(-2.19), asn: 15169(-1.66), country: US(-0.08)]; FORGED_SENDER(0.30)[tomek@cedro.info,tomekcedro@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[tomek@cedro.info,tomekcedro@gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2019 23:21:26 -0000 On Wed, Jan 2, 2019 at 12:15 PM Greg V wrote: > - you might have to run OpenCL applications with > LD_PRELOAD=/lib/libthr.so.3 (when they're single thread applications > like clinfo) https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214204 > - you have to rebuild the kernel driver with this patch > https://github.com/FreeBSDDesktop/kms-drm/issues/33#issuecomment-422793245 > > keep in mind that Clover is not very good. It can't yet handle Blender, > doesn't have image support for Darktable, etc. Thank you Greg! LD_PRELOAD trick does not help.. For instance with john: # john --list=opencl-devices Platform #0 name: Clover Platform version: OpenCL 1.1 Mesa 18.1.9 Device #0 (0) name: Radeon RX 580 Series (POLARIS10, DRM 3.23.0, 12.0-RELEASE, LLVM 6.0.1) Device vendor: AMD Device type: GPU (LE) Device version: OpenCL 1.1 Mesa 18.1.9 Driver version: 18.1.9 Native vector widths: char 16, short 8, int 4, long 2 Preferred vector width: char 16, short 8, int 4, long 2 Global Memory: 8.0 GB Local Memory: 32.0 KB (Local) Max memory alloc. size: 5.0 GB Max clock (MHz): 4294968662 Max Work Group Size: 256 Parallel compute cores: 36 Stream processors: 2304 (36 x 64) # john --format=Raw-SHA1-opencl -test Device 0: Radeon RX 580 Series (POLARIS10, DRM 3.23.0, 12.0-RELEASE, LLVM 6.0.1) OpenCL error (UNKNOWN OPENCL ERROR) in file (common-opencl.c) at line (1782) - (Source kernel not found!) With clinfo: # clinfo Number of platforms 1 Platform Name Clover Platform Vendor Mesa Platform Version OpenCL 1.1 Mesa 18.1.9 Platform Profile FULL_PROFILE Platform Extensions cl_khr_icd Platform Extensions function suffix MESA Platform Name Clover Number of devices 1 Device Name Radeon RX 580 Series (POLARIS10, DRM 3.23.0, 12.0-RELEASE, LLVM 6.0.1) Device Vendor AMD Device Vendor ID 0x1002 Device Version OpenCL 1.1 Mesa 18.1.9 Driver Version 18.1.9 Device OpenCL C Version OpenCL C 1.1 Device Type GPU Device Profile FULL_PROFILE Max compute units 36 Max clock frequency 1366MHz Max work item dimensions 3 Max work item sizes 256x256x256 Max work group size 256 Preferred work group size multiple 64 Preferred / native vector sizes char 16 / 16 short 8 / 8 int 4 / 4 long 2 / 2 half 8 / 8 (cl_khr_fp16) float 4 / 4 double 2 / 2 (cl_khr_fp64) Half-precision Floating-point support (cl_khr_fp16) Denormals No Infinity and NANs Yes Round to nearest Yes Round to zero No Round to infinity No IEEE754-2008 fused multiply-add No Support is emulated in software No Correctly-rounded divide and sqrt operations No Single-precision Floating-point support (core) Denormals No Infinity and NANs Yes Round to nearest Yes Round to zero No Round to infinity No IEEE754-2008 fused multiply-add No Support is emulated in software No Correctly-rounded divide and sqrt operations No Double-precision Floating-point support (cl_khr_fp64) Denormals Yes Infinity and NANs Yes Round to nearest Yes Round to zero Yes Round to infinity Yes IEEE754-2008 fused multiply-add Yes Support is emulated in software No Correctly-rounded divide and sqrt operations No Address bits 64, Little-Endian Global memory size 8589934592 (8GiB) Error Correction support No Max memory allocation 6440266752 (5.998GiB) Unified memory for Host and Device No Minimum alignment for any data type 128 bytes Alignment of base address 32768 bits (4096 bytes) Global Memory cache type None Image support No Local memory type Local Local memory size 32768 (32KiB) Max constant buffer size 2147483647 (2GiB) Max number of constant args 16 Max size of kernel argument 1024 Queue properties Out-of-order execution No Profiling Yes Profiling timer resolution 0ns Execution capabilities Run OpenCL kernels Yes Run native kernels No Device Available Yes Compiler Available Yes Device Extensions cl_khr_byte_addressable_store 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_fp64 cl_khr_fp16 NULL platform behavior clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) Clover clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [MESA] clCreateContext(NULL, ...) [default] Success [MESA] clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1) Platform Name Clover Device Name Radeon RX 580 Series (POLARIS10, DRM 3.23.0, 12.0-RELEASE, LLVM 6.0.1) clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1) Platform Name Clover Device Name Radeon RX 580 Series (POLARIS10, DRM 3.23.0, 12.0-RELEASE, LLVM 6.0.1) ICD loader properties ICD loader Name OpenCL ICD Loader ICD loader Vendor OCL Icd free software ICD loader Version 2.2.12 ICD loader Profile OpenCL 2.2 NOTE: your OpenCL library declares to support OpenCL 2.2, but it seems to support up to OpenCL 2.1 only. Segmentation fault (core dumped) root@hexagon:~ # env| grep LD LD_PRELOAD=/lib/libthr.so.3 # ls /lib/libthr.so.3 /lib/libthr.so.3 -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info