numo-openblas 0.4.1 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +1 -4
- data/CHANGELOG.md +14 -0
- data/README.md +1 -1
- data/ext/numo/openblas/extconf.rb +7 -30
- data/ext/numo/openblas/openblas.c +1 -1
- data/lib/numo/openblas/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e17d60288877e3a4d872749c2a3272c729d8055be55762bda44247d0cbbc1f48
|
4
|
+
data.tar.gz: 34b4fe4753e2d1d603b8ebaa7f4e92c440b814f61a3f5ac6de7d506b1002a6d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 570e223c3cb6687aa379e89906d7d1c506891bb21a8a129a1dcfdd4c396a12a24fd6cc61ffd06eb8c94a2e82ef844029e4d0dc747d3436fc46adac3d97597c1a
|
7
|
+
data.tar.gz: e3f95b0846f15291970c25c033bd4a3e9abc254554893b4b8877e9073cca8e317153e474f81852b9da2bd1c2e01c5cbbd2e8f5f86fb247603ae762b7981e5640
|
data/.github/workflows/build.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## 0.4.5
|
2
|
+
- Change the version of OpenBLAS to be downloaded to 0.3.19.
|
3
|
+
|
4
|
+
## 0.4.4
|
5
|
+
- Change the version of OpenBLAS to be downloaded to 0.3.18.
|
6
|
+
|
7
|
+
## 0.4.3
|
8
|
+
- Change the version of OpenBLAS to be downloaded to 0.3.17.
|
9
|
+
- Refactor build script.
|
10
|
+
|
11
|
+
## 0.4.2
|
12
|
+
- Change the version of OpenBLAS to be downloaded to 0.3.16.
|
13
|
+
- Fix API documentation.
|
14
|
+
|
1
15
|
## 0.4.1
|
2
16
|
- Remove dependent gem's type declaration file from installation files.
|
3
17
|
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[](https://github.com/yoshoku/numo-openblas/actions?query=workflow%3Abuild)
|
4
4
|
[](https://badge.fury.io/rb/numo-openblas)
|
5
|
-
[](https://github.com/yoshoku/
|
5
|
+
[](https://github.com/yoshoku/numo-openblas/blob/main/LICENSE.txt)
|
6
6
|
|
7
7
|
Numo::OpenBLAS downloads and builds [OpenBLAS](https://www.openblas.net/) during installation and
|
8
8
|
uses that as a background library for [Numo::Linalg](https://github.com/ruby-numo/numo-linalg).
|
@@ -8,23 +8,18 @@ require 'open-uri'
|
|
8
8
|
require 'open3'
|
9
9
|
require 'rubygems/package'
|
10
10
|
|
11
|
-
OPENBLAS_VER = '0.3.
|
12
|
-
OPENBLAS_KEY = '
|
11
|
+
OPENBLAS_VER = '0.3.19'
|
12
|
+
OPENBLAS_KEY = '0b0b2d1b56ea338ae07d11ab2780c108c188bebf'
|
13
13
|
OPENBLAS_URI = "https://github.com/xianyi/OpenBLAS/archive/v#{OPENBLAS_VER}.tar.gz"
|
14
14
|
OPENBLAS_DIR = File.expand_path(__dir__ + '/../../../vendor')
|
15
15
|
|
16
16
|
unless File.exist?("#{OPENBLAS_DIR}/installed_#{OPENBLAS_VER}")
|
17
|
-
puts "Downloading OpenBLAS #{OPENBLAS_VER}."
|
18
17
|
URI.open(OPENBLAS_URI) do |rf|
|
19
18
|
File.open("#{OPENBLAS_DIR}/tmp/openblas.tgz", 'wb') { |sf| sf.write(rf.read) }
|
20
19
|
end
|
21
20
|
|
22
|
-
if OPENBLAS_KEY != Digest::SHA1.file("#{OPENBLAS_DIR}/tmp/openblas.tgz").to_s
|
23
|
-
puts 'SHA1 digest of downloaded file does not match.'
|
24
|
-
exit(1)
|
25
|
-
end
|
21
|
+
abort('SHA1 digest of downloaded file does not match.') if OPENBLAS_KEY != Digest::SHA1.file("#{OPENBLAS_DIR}/tmp/openblas.tgz").to_s
|
26
22
|
|
27
|
-
puts 'Unpacking OpenBLAS tar.gz file.'
|
28
23
|
Gem::Package::TarReader.new(Zlib::GzipReader.open("#{OPENBLAS_DIR}/tmp/openblas.tgz")) do |tar|
|
29
24
|
tar.each do |entry|
|
30
25
|
next unless entry.file?
|
@@ -39,38 +34,20 @@ unless File.exist?("#{OPENBLAS_DIR}/installed_#{OPENBLAS_VER}")
|
|
39
34
|
end
|
40
35
|
|
41
36
|
Dir.chdir("#{OPENBLAS_DIR}/tmp/OpenBLAS-#{OPENBLAS_VER}") do
|
42
|
-
puts 'Building OpenBLAS. This could take a while...'
|
43
37
|
mkstdout, _mkstderr, mkstatus = Open3.capture3("make -j#{Etc.nprocessors}")
|
44
38
|
File.open("#{OPENBLAS_DIR}/tmp/openblas.log", 'w') { |f| f.puts(mkstdout) }
|
45
|
-
unless mkstatus.success?
|
46
|
-
puts 'Failed to build OpenBLAS.'
|
47
|
-
puts 'Check the openblas.log file for more details:'
|
48
|
-
puts "#{OPENBLAS_DIR}/tmp/openblas.log"
|
49
|
-
exit(1)
|
50
|
-
end
|
39
|
+
abort("Failed to build OpenBLAS. Check the openblas.log file for more details: #{OPENBLAS_DIR}/tmp/openblas.log") unless mkstatus.success?
|
51
40
|
|
52
|
-
puts 'Installing OpenBLAS.'
|
53
41
|
insstdout, _insstderr, insstatus = Open3.capture3("make install PREFIX=#{OPENBLAS_DIR}")
|
54
42
|
File.open("#{OPENBLAS_DIR}/tmp/openblas.log", 'a') { |f| f.puts(insstdout) }
|
55
|
-
unless insstatus.success?
|
56
|
-
puts 'Failed to install OpenBLAS.'
|
57
|
-
puts 'Check the openblas.log file for more details:'
|
58
|
-
puts "#{OPENBLAS_DIR}/tmp/openblas.log"
|
59
|
-
exit(1)
|
60
|
-
end
|
43
|
+
abort("Failed to install OpenBLAS. Check the openblas.log file for more details: #{OPENBLAS_DIR}/tmp/openblas.log") unless insstatus.success?
|
61
44
|
|
62
45
|
FileUtils.touch("#{OPENBLAS_DIR}/installed_#{OPENBLAS_VER}")
|
63
46
|
end
|
64
47
|
end
|
65
48
|
|
66
|
-
unless find_library('openblas', nil, "#{OPENBLAS_DIR}/lib")
|
67
|
-
puts 'libopenblas is not found.'
|
68
|
-
exit(1)
|
69
|
-
end
|
49
|
+
abort('libopenblas is not found.') unless find_library('openblas', nil, "#{OPENBLAS_DIR}/lib")
|
70
50
|
|
71
|
-
unless find_header('openblas_config.h', nil, "#{OPENBLAS_DIR}/include")
|
72
|
-
puts 'openblas_config.h is not found.'
|
73
|
-
exit(1)
|
74
|
-
end
|
51
|
+
abort('openblas_config.h is not found.') unless find_header('openblas_config.h', nil, "#{OPENBLAS_DIR}/include")
|
75
52
|
|
76
53
|
create_makefile('numo/openblas/openblas')
|
@@ -18,7 +18,7 @@ void Init_openblas()
|
|
18
18
|
mNumo = rb_define_module("Numo");
|
19
19
|
|
20
20
|
/**
|
21
|
-
* Document-module: Numo::
|
21
|
+
* Document-module: Numo::OpenBLAS
|
22
22
|
* Numo::OpenBLAS loads Numo::NArray and Linalg with OpenBLAS used as backend library.
|
23
23
|
*/
|
24
24
|
mOpenBLAS = rb_define_module_under(mNumo, "OpenBLAS");
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: numo-openblas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yoshoku
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: numo-linalg
|
@@ -59,7 +59,7 @@ metadata:
|
|
59
59
|
source_code_uri: https://github.com/yoshoku/numo-openblas
|
60
60
|
changelog_uri: https://github.com/yoshoku/numo-openblas/blob/main/CHANGELOG.md
|
61
61
|
documentation_uri: https://github.com/yoshoku/numo-openblas/blob/main/README.md
|
62
|
-
post_install_message:
|
62
|
+
post_install_message:
|
63
63
|
rdoc_options: []
|
64
64
|
require_paths:
|
65
65
|
- lib
|
@@ -74,8 +74,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
requirements: []
|
77
|
-
rubygems_version: 3.
|
78
|
-
signing_key:
|
77
|
+
rubygems_version: 3.3.3
|
78
|
+
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: Numo::OpenBLAS downloads and builds OpenBLAS during installation and uses
|
81
81
|
that as a background library for Numo::Linalg.
|