Bug 250562 - devel/opencl: lacks OpenCL 3.0 support
Summary: devel/opencl: lacks OpenCL 3.0 support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2020-10-23 16:25 UTC by Jan Beich
Modified: 2021-11-12 18:22 UTC (History)
4 users (show)

See Also:
jmd: maintainer-feedback+
jmd: maintainer-feedback+


Attachments
clinfo output (11.42 KB, text/plain)
2020-10-23 16:25 UTC, Jan Beich
no flags Details
Adapt OpenCL API 3.0 (3.72 KB, patch)
2020-11-23 11:53 UTC, O. Hartmann
no flags Details | Diff
ocl-icd 2.2.13 (3.61 KB, patch)
2020-11-26 17:45 UTC, Jan Beich
no flags Details | Diff
clinfo 3.0.20.11.20 (1.62 KB, patch)
2020-11-26 18:17 UTC, Jan Beich
no flags Details | Diff
clinfo output for OpenCL 3.0 (25.73 KB, text/plain)
2020-11-26 18:20 UTC, Jan Beich
no flags Details
clpeak 1.1.0 (2.01 KB, patch)
2020-11-26 19:12 UTC, Jan Beich
no flags Details | Diff
OpenCL API 3.0, including recent OpenCL-HPP project's opencl.hpp header file. (3.83 KB, patch)
2020-11-28 14:56 UTC, O. Hartmann
no flags Details | Diff
Update devel/ocl-icd to v2.2.13 to fit OCL API 3.0 (3.75 KB, patch)
2020-11-28 15:28 UTC, O. Hartmann
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2020-10-23 16:25:49 UTC
Created attachment 219007 [details]
clinfo output

$ pkg install clinfo intel-compute-runtime
$ clinfo
[...]
        NOTE:   your OpenCL library declares to support OpenCL 2.2,
                but it seems to support up to OpenCL 1.0 only.
        NOTE:   your OpenCL library only supports OpenCL 1.0,
                but some installed platforms support OpenCL 3.0.
                Programs using 3.0 features may crash
                or behave unexpectedly
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2020-10-23 16:25:49 UTC
Maintainer informed via mail
Comment 2 Jan Beich freebsd_committer freebsd_triage 2020-10-23 16:29:56 UTC
ohartman@zedat.fu-berlin.de and ohartmann@walstatt.org are probably the same person, so requesting maintainer-feedback flag.
Comment 3 O. Hartmann 2020-11-23 11:53:51 UTC
Created attachment 219902 [details]
Adapt OpenCL API 3.0

Attached you'll find a pacth file against the ports tree devel/opencl, adapting latest released API 3.0 standard as well as updated maintainer eMail (myself). Have not fully tested the compliance of the new API 3.0 against depending ports!
Comment 4 Jan Beich freebsd_committer freebsd_triage 2020-11-26 17:45:18 UTC
Created attachment 220004 [details]
ocl-icd 2.2.13

clinfo still claimed "OpenCL 2.2" until ocl-icd was updated.

https://github.com/OCL-dev/ocl-icd/compare/v2.2.12...v2.2.13
Comment 5 Jan Beich freebsd_committer freebsd_triage 2020-11-26 18:17:15 UTC
Created attachment 220005 [details]
clinfo 3.0.20.11.20

clinfo itself also needed to support OpenCL 3.0 for the warning to completely disappear.

https://github.com/Oblomov/clinfo/compare/2.2.18.04.06...3.0.20.11.20
Comment 6 Jan Beich freebsd_committer freebsd_triage 2020-11-26 18:20:24 UTC
Created attachment 220006 [details]
clinfo output for OpenCL 3.0
Comment 7 Jan Beich freebsd_committer freebsd_triage 2020-11-26 19:12:38 UTC
Created attachment 220007 [details]
clpeak 1.1.0

clpeak didn't like opencl update after https://github.com/KhronosGroup/OpenCL-CLHPP/commit/432b551429b3

In file included from src/common.cpp:1:
include/common.h:4:10: fatal error: 'CL/cl.hpp' file not found
#include <CL/cl.hpp>
         ^~~~~~~~~~~

https://github.com/krrishnarraj/clpeak/compare/1.1.0-rc2...1.1.0
https://github.com/krrishnarraj/clpeak/commit/db42d30028ba
Comment 8 Jan Beich freebsd_committer freebsd_triage 2020-11-26 19:17:16 UTC
Comment on attachment 219902 [details]
Adapt OpenCL API 3.0

Can you rebase against current ports/ tree?

$ make
===>  Patching for opencl-3.0
===>  Applying FreeBSD patches for opencl-3.0 from /usr/ports/devel/opencl/files
1 out of 1 hunks failed--saving rejects to cl_platform.h.rej
===>  FAILED Applying FreeBSD patch-cl__platform.h
===> FAILED to apply cleanly FreeBSD patch(es)  patch-cl__platform.h
*** Error code 1

> -PORTVERSION=	2.2
> -PORTREVISION=	2
> +PORTVERSION=	3.0
[...]
> -COMMENT=	Open Computing Language (OpenCL) specifications V2.2 (header files)
> +COMMENT=	Open Computing Language (OpenCL) specifications V3.0 (header files)
[...]
> -These header are covering OpenCL API 2.2
> +These header are covering OpenCL API 3.0

Why duplicate OpenCL version in COMMENT and pkg-descr?

> -LICENSE=	unknown
> +LICENSE=	Apache 2.0

Define LICENSE=APACHE20 instead and drop other LICENSE_* variables. Otherwise, it fails to build:

===>  License not correctly defined: multiple licenses in LICENSE, but LICENSE_COMB is set to single (or undefined)
make: exec(exit) failed (No such file or directory)

> -CONFLICTS=	opencl-1.[0-2]
> +CONFLICTS=	opencl-[1-2].[0-2]

CONFLICTS has no impact on current package. If no other package is named "opencl" then CONFLICTS can be dropped.

> -CLHPP_TAG=	8b6a312
> +CLHPP_TAG=	524f5ca

benchmarks/clpeak needs header from a newer CLHPP snapshot. Can you update and include CL/opencl.hpp?

In file included from src/logger.cpp:1:
In file included from include/logger.h:12:
include/common.h:8:10: fatal error: 'CL/opencl.hpp' file not found
#include <CL/opencl.hpp>
         ^~~~~~~~~~~~~~~
Comment 9 O. Hartmann 2020-11-28 14:56:40 UTC
Created attachment 220045 [details]
OpenCL API 3.0, including recent OpenCL-HPP project's opencl.hpp header file.

According to some mistakes made on a non-recent ports tree and some issues with other related ports, this patch tries to adapt from the issues reported herein.
Comment 10 O. Hartmann 2020-11-28 15:28:16 UTC
Created attachment 220046 [details]
Update devel/ocl-icd to v2.2.13 to fit OCL API 3.0

Made some minor changes to Jan Beichs patch. I should put this issue into a dedicated PR.
Comment 11 Johannes M Dieterich freebsd_committer freebsd_triage 2020-11-30 03:46:46 UTC
LGTM for the clpeak patch.
Comment 12 commit-hook freebsd_committer freebsd_triage 2020-11-30 21:07:22 UTC
A commit references this bug:

Author: jbeich
Date: Mon Nov 30 21:07:02 UTC 2020
New revision: 556679
URL: https://svnweb.freebsd.org/changeset/ports/556679

Log:
  devel/opencl: update to 3.0

  - Update MAINTAINER address
  - Define LICENSE as standard
  - Drop CONFLICTS against itself

  PR:		250562
  Submitted by:	O. Hartmann (maintainer)

Changes:
  head/devel/opencl/Makefile
  head/devel/opencl/distinfo
  head/devel/opencl/files/
  head/devel/opencl/pkg-descr
  head/devel/opencl/pkg-plist
Comment 13 commit-hook freebsd_committer freebsd_triage 2020-11-30 21:08:23 UTC
A commit references this bug:

Author: jbeich
Date: Mon Nov 30 21:07:30 UTC 2020
New revision: 556680
URL: https://svnweb.freebsd.org/changeset/ports/556680

Log:
  devel/ocl-icd: update to 2.2.13

  - Drop obsolete CONFLICTS after r438910

  Changes:	https://github.com/OCL-dev/ocl-icd/compare/v2.2.12...v2.2.13
  PR:		250562
  Approved by:	O. Hartmann (maintainer)

Changes:
  head/devel/ocl-icd/Makefile
  head/devel/ocl-icd/distinfo
  head/devel/ocl-icd/files/patch-icd__generator.rb
  head/devel/ocl-icd/files/patch-ocl__icd__loader.c
  head/devel/ocl-icd/pkg-descr
Comment 14 commit-hook freebsd_committer freebsd_triage 2020-11-30 21:08:24 UTC
A commit references this bug:

Author: jbeich
Date: Mon Nov 30 21:07:36 UTC 2020
New revision: 556681
URL: https://svnweb.freebsd.org/changeset/ports/556681

Log:
  benchmarks/clpeak: update to 1.1.0

  Changes:	https://github.com/krrishnarraj/clpeak/compare/1.1.0-rc2...1.1.0
  PR:		250562
  Approved by:	jmd (maintainer)

Changes:
  head/benchmarks/clpeak/Makefile
  head/benchmarks/clpeak/distinfo
Comment 15 Jan Beich freebsd_committer freebsd_triage 2020-11-30 21:12:31 UTC
Still waiting for devel/clinfo update approval.
Comment 16 Jan Beich freebsd_committer freebsd_triage 2020-11-30 21:15:10 UTC
Comment on attachment 220045 [details]
OpenCL API 3.0, including recent OpenCL-HPP project's opencl.hpp header file.

This version was still bitrotten, so I've salvaged bare minimum. Please, resubmit the remaining changes in a separate bug.

$ make clean all
===>  Cleaning for opencl-3.0
===>  License not correctly defined: multiple licenses in LICENSE, but LICENSE_COMB is set to single (or undefined)
make: exec(exit) failed (No such file or directory)
*** Error code 1

$ make clean all DISABLE_LICENSES=
===>  Cleaning for opencl-3.0
===>   opencl-3.0 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by opencl-3.0 for building
===>  Extracting for opencl-3.0
=> SHA256 Checksum OK for KhronosGroup-OpenCL-Headers-3.0-b04034a_GH0.tar.gz.
=> SHA256 Checksum OK for KhronosGroup-OpenCL-CLHPP-64c206f_GH0.tar.gz.
===>  Patching for opencl-3.0
===>  Applying FreeBSD patches for opencl-3.0 from /usr/ports/default/devel/opencl/files
1 out of 1 hunks failed--saving rejects to cl_platform.h.rej
===>  FAILED Applying FreeBSD patch-cl__platform.h
===> FAILED to apply cleanly FreeBSD patch(es)  patch-cl__platform.h
*** Error code 1
Comment 17 Jan Beich freebsd_committer freebsd_triage 2020-11-30 21:18:23 UTC
Comment on attachment 220046 [details]
Update devel/ocl-icd to v2.2.13 to fit OCL API 3.0

This version was still bitrotten, so I've salvaged bare minimum. Please, resubmit the remaining changes in a separate bug.

$ make clean all
===>  Cleaning for ocl-icd-2.2.13
===>  License BSD2CLAUSE accepted by the user
===>   ocl-icd-2.2.13 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by ocl-icd-2.2.13 for building
===>  Extracting for ocl-icd-2.2.13
=> SHA256 Checksum OK for OCL-dev-ocl-icd-v2.2.13_GH0.tar.gz.
===>   ocl-icd-2.2.13 depends on file: /usr/local/bin/ruby27 - found
===>  Patching for ocl-icd-2.2.13
===>   ocl-icd-2.2.13 depends on file: /usr/local/bin/ruby27 - found
===>  Applying FreeBSD patches for ocl-icd-2.2.13 from /usr/ports/devel/ocl-icd/files
Ignoring previously applied (or reversed) patch.
1 out of 1 hunks ignored--saving rejects to icd_generator.rb.rej
===>  FAILED Applying FreeBSD patch-icd__generator.rb
===> FAILED to apply cleanly FreeBSD patch(es)  patch-icd__generator.rb
*** Error code 1
Comment 18 Jan Beich freebsd_committer freebsd_triage 2020-12-06 10:04:06 UTC
Ping. I still need x11@ approval for attachment 220005 [details].
Comment 19 Jan Beich freebsd_committer freebsd_triage 2020-12-10 15:40:55 UTC
Ping. I can't use "maintainer timeout" with x11@ ports, so, please, don't ignore the approval request.
Comment 20 Emmanuel Vadot freebsd_committer freebsd_triage 2020-12-11 09:20:59 UTC
Approved.
x11 isn't in the maintainer approval field.
Comment 21 commit-hook freebsd_committer freebsd_triage 2020-12-12 10:45:17 UTC
A commit references this bug:

Author: jbeich
Date: Sat Dec 12 10:44:12 UTC 2020
New revision: 557809
URL: https://svnweb.freebsd.org/changeset/ports/557809

Log:
  devel/clinfo: update to 3.0.20.11.20

  Changes:	https://github.com/Oblomov/clinfo/compare/2.2.18.04.06...3.0.20.11.20
  PR:		250562
  Approved by:	manu

Changes:
  head/devel/clinfo/Makefile
  head/devel/clinfo/distinfo
Comment 22 Jan Beich freebsd_committer freebsd_triage 2020-12-12 10:47:21 UTC
(In reply to Emmanuel Vadot from comment #20)
> x11 isn't in the maintainer approval field.

I did complain to bugmeister@ years ago the distinction between maintainer-approval attachment flag and maintainer-feedback bug flag is confusing. Many maintainers still abuse maintainer-feedback for approval e.g., jmd@ here. ;)
Comment 23 commit-hook freebsd_committer freebsd_triage 2021-11-12 18:22:20 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6094a5284f6a9a0ce938169f7761aa1d1198439e

commit 6094a5284f6a9a0ce938169f7761aa1d1198439e
Author:     O. Hartmann <ohartmann@walstatt.org>
AuthorDate: 2021-10-23 15:33:20 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-11-12 18:16:49 +0000

    devel/ocl-icd: update to 2.3.1

    Changes:        https://github.com/OCL-dev/ocl-icd/compare/v2.2.13...v2.3.1
    PR:             250562

 devel/ocl-icd/Makefile  | 4 ++--
 devel/ocl-icd/distinfo  | 6 +++---
 devel/ocl-icd/pkg-plist | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)