numo-openblas 0.4.0 → 0.4.4
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 +3 -5
- data/.gitignore +2 -0
- data/CHANGELOG.md +14 -0
- data/README.md +1 -1
- data/Steepfile +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
- data/numo-openblas.gemspec +1 -1
- metadata +6 -7
- data/sig/patch.rbs +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75094ee0125abe4f4cdd6eb93e8d5ff8d67a7789f842352db2f83bc4def17e22
|
4
|
+
data.tar.gz: c9bc793e378f5ad5a5f6fe78b967e354d4b824e5768c98fb8444ca508ac197af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ffb634e056dd3e8877adb543aeaa704323cdb968224c533d2b30b7696f74b417dab0c0218a320acfe7a3224ce9773468f30e8224ae094881171666362c72453
|
7
|
+
data.tar.gz: b27bf6ebb86ffcc213276d89a7d98751f489da470299ed2617ff5ad05ee96f1209483caa632f02e99560d85736ebbab285c064bb70b45999ebd08cd94a50de95
|
data/.github/workflows/build.yml
CHANGED
@@ -14,11 +14,9 @@ jobs:
|
|
14
14
|
- name: Install gcc and gfortran
|
15
15
|
run: sudo apt-get install -y gcc gfortran
|
16
16
|
- name: Set up Ruby ${{ matrix.ruby }}
|
17
|
-
uses:
|
17
|
+
uses: ruby/setup-ruby@v1
|
18
18
|
with:
|
19
19
|
ruby-version: ${{ matrix.ruby }}
|
20
|
+
bundler-cache: true
|
20
21
|
- name: Build and test with Rake
|
21
|
-
run:
|
22
|
-
gem install --no-document bundler
|
23
|
-
bundle install --jobs 4 --retry 3
|
24
|
-
bundle exec rake
|
22
|
+
run: bundle exec rake
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## 0.4.4
|
2
|
+
- Change the version of OpenBLAS to be downloaded to 0.3.18.
|
3
|
+
|
4
|
+
## 0.4.3
|
5
|
+
- Change the version of OpenBLAS to be downloaded to 0.3.17.
|
6
|
+
- Refactor build script.
|
7
|
+
|
8
|
+
## 0.4.2
|
9
|
+
- Change the version of OpenBLAS to be downloaded to 0.3.16.
|
10
|
+
- Fix API documentation.
|
11
|
+
|
12
|
+
## 0.4.1
|
13
|
+
- Remove dependent gem's type declaration file from installation files.
|
14
|
+
|
1
15
|
## 0.4.0
|
2
16
|
- Add type declaration file: sig/numo/openblas.rbs
|
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).
|
data/Steepfile
CHANGED
@@ -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.18'
|
12
|
+
OPENBLAS_KEY = 'a9d5ce86908657f002c6566cd8f35fe882709be4'
|
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");
|
data/numo-openblas.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
# Specify which files should be added to the gem when it is released.
|
26
26
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
27
27
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
28
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
28
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|sig-deps)/}) }
|
29
29
|
end
|
30
30
|
spec.bindir = 'exe'
|
31
31
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
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.4
|
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-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: numo-linalg
|
@@ -50,7 +50,6 @@ files:
|
|
50
50
|
- lib/numo/openblas/version.rb
|
51
51
|
- numo-openblas.gemspec
|
52
52
|
- sig/numo/openblas.rbs
|
53
|
-
- sig/patch.rbs
|
54
53
|
- vendor/tmp/.gitkeep
|
55
54
|
homepage: https://github.com/yoshoku/numo-openblas
|
56
55
|
licenses:
|
@@ -60,7 +59,7 @@ metadata:
|
|
60
59
|
source_code_uri: https://github.com/yoshoku/numo-openblas
|
61
60
|
changelog_uri: https://github.com/yoshoku/numo-openblas/blob/main/CHANGELOG.md
|
62
61
|
documentation_uri: https://github.com/yoshoku/numo-openblas/blob/main/README.md
|
63
|
-
post_install_message:
|
62
|
+
post_install_message:
|
64
63
|
rdoc_options: []
|
65
64
|
require_paths:
|
66
65
|
- lib
|
@@ -75,8 +74,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
74
|
- !ruby/object:Gem::Version
|
76
75
|
version: '0'
|
77
76
|
requirements: []
|
78
|
-
rubygems_version: 3.
|
79
|
-
signing_key:
|
77
|
+
rubygems_version: 3.2.32
|
78
|
+
signing_key:
|
80
79
|
specification_version: 4
|
81
80
|
summary: Numo::OpenBLAS downloads and builds OpenBLAS during installation and uses
|
82
81
|
that as a background library for Numo::Linalg.
|