diff options
-rw-r--r-- | debian/changelog | 59 | ||||
-rw-r--r-- | debian/clblast-tests.install | 1 | ||||
-rw-r--r-- | debian/clblast-utils.install | 1 | ||||
-rw-r--r-- | debian/control | 75 | ||||
-rw-r--r-- | debian/copyright | 17 | ||||
-rw-r--r-- | debian/libclblast-dev.install | 5 | ||||
-rw-r--r-- | debian/libclblast1.install | 1 | ||||
-rw-r--r-- | debian/libclblast1.shlibs | 1 | ||||
-rwxr-xr-x | debian/rules | 27 | ||||
-rw-r--r-- | debian/source/format | 1 | ||||
-rw-r--r-- | debian/tests/control | 4 | ||||
-rw-r--r-- | debian/tests/find_pocl.c | 86 | ||||
-rwxr-xr-x | debian/tests/tests-pocl.sh | 41 | ||||
-rw-r--r-- | debian/upstream/metadata | 4 | ||||
-rw-r--r-- | debian/watch | 3 |
15 files changed, 326 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..12ef0bf3 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,59 @@ +clblast (1.6.0-1) unstable; urgency=medium + + * New upstream release. + + -- Gard Spreemann <gspr@nonempty.org> Thu, 08 Jun 2023 11:54:29 +0200 + +clblast (1.5.3-3) unstable; urgency=medium + + [ Debian Janitor ] + * Set upstream metadata fields. + + [ Gard Spreemann ] + * Standards-version 4.6.2.0. No changes needed. + + -- Gard Spreemann <gspr@nonempty.org> Thu, 26 Jan 2023 16:45:33 +0100 + +clblast (1.5.3-2) unstable; urgency=medium + + * Restrict autopkgtests to a limited set of architectures (precision + problems on others). + * Discover autopkgtests at run-time. + + -- Gard Spreemann <gspr@nonempty.org> Thu, 13 Oct 2022 16:47:47 +0200 + +clblast (1.5.3-1) unstable; urgency=medium + + * New upstream release. + * Drop upstreamed patch. + * Standards-version 4.6.1.1. No changes needed. + * Add autopkgtests. + + -- Gard Spreemann <gspr@nonempty.org> Wed, 12 Oct 2022 20:07:27 +0200 + +clblast (1.5.2-2) unstable; urgency=medium + + * Add patch to correct typo in installation path of CMake + files. (Closes: #987881) + + -- Gard Spreemann <gspr@nonempty.org> Sat, 01 May 2021 13:55:46 +0200 + +clblast (1.5.2-1) unstable; urgency=medium + + * New upstream release. + * Drop erroneous suggests caused by typo. + + -- Gard Spreemann <gspr@nonempty.org> Wed, 20 Jan 2021 15:44:39 +0100 + +clblast (1.5.1-2) unstable; urgency=medium + + * Move git repository to Salsa. + * Add watch file. + + -- Gard Spreemann <gspr@nonempty.org> Sun, 10 Jan 2021 12:33:04 +0100 + +clblast (1.5.1-1) unstable; urgency=medium + + * Initial release (Closes: #977907) + + -- Gard Spreemann <gspr@nonempty.org> Tue, 22 Dec 2020 18:38:01 +0100 diff --git a/debian/clblast-tests.install b/debian/clblast-tests.install new file mode 100644 index 00000000..ca452daa --- /dev/null +++ b/debian/clblast-tests.install @@ -0,0 +1 @@ +usr/bin/clblast_test_*
\ No newline at end of file diff --git a/debian/clblast-utils.install b/debian/clblast-utils.install new file mode 100644 index 00000000..36e40000 --- /dev/null +++ b/debian/clblast-utils.install @@ -0,0 +1 @@ +usr/bin/clblast_tuner_* diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..f3d9ed3a --- /dev/null +++ b/debian/control @@ -0,0 +1,75 @@ +Source: clblast +Maintainer: Gard Spreemann <gspr@nonempty.org> +Section: math +Priority: optional +Standards-Version: 4.6.2.0 +Build-Depends: cmake, + debhelper-compat (= 13), + libblas-dev, + ocl-icd-opencl-dev | opencl-dev +Rules-Requires-Root: no +Homepage: https://cnugteren.github.io/clblast/clblast.html +Vcs-Browser: https://salsa.debian.org/gspr/clblast +Vcs-Git: https://salsa.debian.org/gspr/clblast.git -b debian/sid + +Package: clblast-tests +Section: math +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Tests for CLBlast + CLBlast is a modern, lightweight, performant and tunable OpenCL BLAS + library written in C++11. It is designed to leverage the full + performance potential of a wide variety of OpenCL devices from + different vendors, including desktop and laptop GPUs, embedded GPUs, + and other accelerators. CLBlast implements BLAS routines: basic + linear algebra subprograms operating on vectors and matrices. + . + This package provides tests and benchmarks against other BLAS + implementations. + +Package: clblast-utils +Section: math +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Utilities for CLBlast + CLBlast is a modern, lightweight, performant and tunable OpenCL BLAS + library written in C++11. It is designed to leverage the full + performance potential of a wide variety of OpenCL devices from + different vendors, including desktop and laptop GPUs, embedded GPUs, + and other accelerators. CLBlast implements BLAS routines: basic + linear algebra subprograms operating on vectors and matrices. + . + This package provides utilities for tuning the implementation for + specific hardware. + +Package: libclblast1 +Section: libs +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Tuned OpenCL BLAS library + CLBlast is a modern, lightweight, performant and tunable OpenCL BLAS + library written in C++11. It is designed to leverage the full + performance potential of a wide variety of OpenCL devices from + different vendors, including desktop and laptop GPUs, embedded GPUs, + and other accelerators. CLBlast implements BLAS routines: basic + linear algebra subprograms operating on vectors and matrices. + . + This package provides the shared library. + +Package: libclblast-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: ${misc:Depends}, + libclblast1 (= ${binary:Version}), + ocl-icd-opencl-dev | opencl-dev +Description: Tuned OpenCL BLAS library (development files) + CLBlast is a modern, lightweight, performant and tunable OpenCL BLAS + library written in C++11. It is designed to leverage the full + performance potential of a wide variety of OpenCL devices from + different vendors, including desktop and laptop GPUs, embedded GPUs, + and other accelerators. CLBlast implements BLAS routines: basic + linear algebra subprograms operating on vectors and matrices. + . + This package provides the static library and headers. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..0036826d --- /dev/null +++ b/debian/copyright @@ -0,0 +1,17 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: CLBlast +Source: https://cnugteren.github.io/clblast/clblast.html + +Files: * +Copyright: 2015-2022 Cedric Nugteren and CLBlast contributors +License: Apache-2.0 + +Files: debian/* +Copyright: 2022 Gard Spreemann <gspr@nonempty.org> +License: Apache-2.0 + +License: Apache-2.0 + The project is licensed under Apache Version 2.0. + . + On Debian systems, the full text of the license can be found in the file + "/usr/share/common-licenses/Apache-2.0". diff --git a/debian/libclblast-dev.install b/debian/libclblast-dev.install new file mode 100644 index 00000000..c97725e0 --- /dev/null +++ b/debian/libclblast-dev.install @@ -0,0 +1,5 @@ +usr/lib/${DEB_HOST_MULTIARCH}/libclblast.so +usr/lib/${DEB_HOST_MULTIARCH}/libclblast.a +usr/include +usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig +usr/lib/${DEB_HOST_MULTIARCH}/cmake diff --git a/debian/libclblast1.install b/debian/libclblast1.install new file mode 100644 index 00000000..d1b958c4 --- /dev/null +++ b/debian/libclblast1.install @@ -0,0 +1 @@ +usr/lib/${DEB_HOST_MULTIARCH}/libclblast.so.*
\ No newline at end of file diff --git a/debian/libclblast1.shlibs b/debian/libclblast1.shlibs new file mode 100644 index 00000000..5a98f456 --- /dev/null +++ b/debian/libclblast1.shlibs @@ -0,0 +1 @@ +libclblast 1 libclblast1 (>= 1.5.1) diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..5e19087e --- /dev/null +++ b/debian/rules @@ -0,0 +1,27 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +FLAGS:=-DCUBLAS=false -DCUDA=false -DNETLIB=false -DOPENCL=true + +%: + dh $@ + +override_dh_auto_configure: + dh_auto_configure --builddirectory=build-static -- -DBUILD_SHARED_LIBS=false -DTUNERS=false -DTESTS=false $(FLAGS) + dh_auto_configure --builddirectory=build -- -DBUILD_SHARED_LIBS=true -DTUNERS=true -DTESTS=true $(FLAGS) + +override_dh_auto_build: + dh_auto_build --builddirectory=build-static + dh_auto_build --builddirectory=build + +override_dh_auto_clean: + dh_auto_clean --builddirectory=build-static + dh_auto_clean --builddirectory=build + +override_dh_auto_install: + dh_auto_install --builddirectory=build-static + dh_auto_install --builddirectory=build + +override_dh_missing: + dh_missing --list-missing diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 00000000..6a167099 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,4 @@ +Tests: tests-pocl.sh +Depends: clblast-tests, colorized-logs, gcc, ocl-icd-opencl-dev | opencl-dev, pocl-opencl-icd +Architecture: amd64 arm64 i386 +Restrictions: allow-stderr diff --git a/debian/tests/find_pocl.c b/debian/tests/find_pocl.c new file mode 100644 index 00000000..dfd25a82 --- /dev/null +++ b/debian/tests/find_pocl.c @@ -0,0 +1,86 @@ +/* + * Identify a POCL platform and device ID for running autopkgtests. + */ + +#include <stdbool.h> +#include <stdio.h> +#include <string.h> + +#define CL_MINIMUM_OPENCL_VERSION 120 +#define CL_TARGET_OPENCL_VERSION 120 +#define CL_CL_1_2_DEFAULT_BUILD + +#include <CL/opencl.h> + +static const cl_uint MAX_PLATFORMS = 128; +static const cl_uint MAX_DEVICES = 128; +static const size_t MAX_PLATFORM_NAME_LEN = 4096; +static const char POCL_NAME[] = "Portable Computing Language"; + +int main(int argc, char ** argv) +{ + cl_uint num_platforms = 0; + cl_platform_id platforms[MAX_PLATFORMS]; + cl_int status = clGetPlatformIDs(MAX_PLATFORMS, platforms, &num_platforms); + if (status != CL_SUCCESS) + { + fprintf(stderr, "Failed to query OpenCL platforms.\n"); + return 1; + } + num_platforms = num_platforms < MAX_PLATFORMS ? num_platforms : MAX_PLATFORMS; + if (num_platforms < 1) + { + fprintf(stderr, "Found no OpenCL platforms.\n"); + return 1; + } + + char platform_name[MAX_PLATFORM_NAME_LEN]; + size_t platform_name_len = 0; + bool pocl_platform_found = false; + cl_uint platform_idx = MAX_PLATFORMS; + for (cl_uint i = 0; i < num_platforms; ++i) + { + status = clGetPlatformInfo(platforms[i], CL_PLATFORM_NAME, MAX_PLATFORM_NAME_LEN-1, platform_name, &platform_name_len); + if (status != CL_SUCCESS) + { + fprintf(stderr, "Failed to get name for OpenCL platform number %u.\n", i); + return 1; + } + platform_name[platform_name_len < MAX_PLATFORM_NAME_LEN - 1 ? platform_name_len : MAX_PLATFORM_NAME_LEN - 1] = '\0'; + if (strcmp(platform_name, POCL_NAME) == 0) + { + platform_idx = i; + pocl_platform_found = true; + break; + } + } + + if (!pocl_platform_found) + { + fprintf(stderr, "Could not find the POCL platform.\n"); + return 1; + } + + + cl_device_id devices[MAX_DEVICES]; + cl_uint num_devices = 0; + cl_uint device_idx = MAX_DEVICES; + status = clGetDeviceIDs(platforms[platform_idx], CL_DEVICE_TYPE_CPU, MAX_DEVICES, devices, &num_devices); + if (status != CL_SUCCESS) + { + fprintf(stderr, "Failed to query OpenCL CPU devices for platform.\n"); + return 1; + } + num_devices = num_devices < MAX_DEVICES ? num_devices : MAX_DEVICES; + + if (num_devices < 1) + { + fprintf(stderr, "Failed to find any devices on platform.\n"); + return 1; + } + + device_idx = 0; // We default to running on the first POCL device. + + printf("%u %u\n", platform_idx, device_idx); + return 0; +} diff --git a/debian/tests/tests-pocl.sh b/debian/tests/tests-pocl.sh new file mode 100755 index 00000000..c99b6872 --- /dev/null +++ b/debian/tests/tests-pocl.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +set -u +set -e + +tests=$(find /usr/bin -type f -name 'clblast_test_*' | sed 's/\/usr\/bin\/clblast_test_//g' | sort) + +gcc -std=c11 -Wall -pedantic -o ${AUTOPKGTEST_TMP}/find_pocl debian/tests/find_pocl.c -lOpenCL + +pocl_platform_and_device=$(${AUTOPKGTEST_TMP}/find_pocl) +pocl_platform=$(echo $pocl_platform_and_device | awk '{ print $1 }') +pocl_device=$(echo $pocl_platform_and_device | awk '{ print $2 }') + +echo "POCL is platform ${pocl_platform}, device ${pocl_device}." + +set +e + +errors=0 + +for test in $tests +do + echo "--------------------------------------------------" + echo "Running test set ${test}." + echo "--------------------------------------------------" + output=$(/usr/bin/clblast_test_${test} -platform $pocl_platform -device $pocl_device) + if [ $? -ne 0 ] + then + errors=$(($errors+1)) + fi + printf "%s\n" "$output" | ansi2txt +done + +echo "--------------------------------------------------" +echo "$errors errors encounted." +echo "--------------------------------------------------" + +if [ $errors -ne 0 ] +then + exit 1 +fi + diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 00000000..968fe5f6 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,4 @@ +--- +Bug-Database: https://github.com/CNugteren/CLBlast/issues +Bug-Submit: https://github.com/CNugteren/CLBlast/issues/new +Repository-Browse: https://github.com/CNugteren/CLBlast diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000..9b2c20df --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=4 +opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%clblast-$1.tar.gz%" \ + https://github.com/CNugteren/CLBlast/tags (?:.*?/)?v?(\d[\d.]*)\.tar\.gz
\ No newline at end of file |