Gentoo Archives: gentoo-science

From: Mo Zhou <lumin@××××××.org>
To: gentoo-science@l.g.o
Subject: [gentoo-science] GSoC Proposal: Improvements to the BLAS / LAPACK and their reverse-dependencies
Date: Mon, 08 Apr 2019 04:18:18
Message-Id: 20190408041740.GC9142@Asuna
1 Hi list,
2
3 I'm going to participate the gsoc project "BLAS and LAPACK runtime"[1].
4 However it seems to pose a significant change on Gentoo Science Team's
5 packages, so I'd better ask for approval first before really working
6 on this, in case anybody disagree with the proposal.
7
8 Briefly speaking,
9
10 The solution of “BLAS and LAPACK runtime switching” is to mimic Debian.
11 The Netlib BLAS and LAPACK packages are mandatory when one needs to
12 build any application on top of BLAS/LAPACK. The netlib implementation
13 functions as the last fallback implementation, a linkder stub, the
14 standard header provider, and most importantly the fallback alternative
15 for libblas.so.3 and liblapack.so.3. All packages depend on BLAS and
16 LAPACK should link against libblas.so.3 or liblapack.so.3, which could
17 be provided by various BLAS and LAPACK implementations. The recommended
18 header used to build reverse dependencies is the one from netlib. All
19 other BLAS and LAPACK implementations should register themselves as
20 alternatives to the netlib implementation, where each implementation
21 provides two groups of candidates: development files, and shared
22 objects.
23
24 The proposed solution involes no usage of USE flag, or eselect feature.
25
26 Objective of this project:
27
28 1. Integrate update-alternatives mechanism into Gentoo's reference blas,
29 i.e. netlib blas' packaging.
30
31 2. Package BLIS for Gentoo, and register it as another netlib blas
32 alternative.
33
34 3. Update the packaging of a BLAS/LAPACK reverse dependency to validate
35 the efficacy of the mechanism on Gentoo. Specifically, the package will
36 be compiled against BLIS's libblas.so.3 and netlib's libblas.so.3
37 respectively, and always use the netlib headers.
38
39 4. Modify the packaging for OpenBLAS to register libopenblas.so as an
40 alternative to netlib blas. Header are not exposed in public include
41 directory.
42
43 5. Update packaging for BLAS and LAPACK reverse dependencies, and
44 enforce linkage against libblas.so.3 (any BLAS implementation could
45 provide this).
46
47 6. Update gentoo wiki or documentations, describing related changes.
48
49 7. Optionally, write an eselect-to-update-alternatives bridge.
50
51 *** Does it sound like an acceptable solution to Gentoo Science Team? ***
52
53 BTW, I'm the Debian Developer maintaining Julia, BLIS, MKL and many
54 other packages. I'm a long-time member of Debian Science Team and many
55 other teams.
56
57 [1] https://wiki.gentoo.org/wiki/Google_Summer_of_Code/2019/Ideas#BLAS_and_LAPACK_runtime_switching

Replies