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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 013ec7921e8a2144bf2ea878408e429826d579f2df0c5bdd7962b27fc75d01e5
4
- data.tar.gz: 16119dea96f0a4ad51bd51cea8b2301a1750c10fe5f2ae6f8e9647bdfb8285e5
3
+ metadata.gz: 75094ee0125abe4f4cdd6eb93e8d5ff8d67a7789f842352db2f83bc4def17e22
4
+ data.tar.gz: c9bc793e378f5ad5a5f6fe78b967e354d4b824e5768c98fb8444ca508ac197af
5
5
  SHA512:
6
- metadata.gz: 9bcb090824e2cc65eb03f1f7aa74dc000a92a88e0472bb75df108dae641df170c8ebd1bbd96bd17394b39516b42bf050c624b5581806f377d56ce986ee6cfc2b
7
- data.tar.gz: a89e4296d0788d2d7a0c17cdb11a6d6ad983f1653ce544a5c9fcf6d526e78ed8ecf38f673122916d5e4598b7bea62c901f82ed106c3da11729061cea681a81fd
6
+ metadata.gz: 5ffb634e056dd3e8877adb543aeaa704323cdb968224c533d2b30b7696f74b417dab0c0218a320acfe7a3224ce9773468f30e8224ae094881171666362c72453
7
+ data.tar.gz: b27bf6ebb86ffcc213276d89a7d98751f489da470299ed2617ff5ad05ee96f1209483caa632f02e99560d85736ebbab285c064bb70b45999ebd08cd94a50de95
@@ -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: actions/setup-ruby@v1
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
@@ -7,10 +7,12 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /vendor/
10
11
 
11
12
  # rspec failure tracking
12
13
  .rspec_status
13
14
 
14
15
  *.swp
16
+ *.bundle
15
17
  .DS_Store
16
18
  .ruby-version
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
  [![Build Status](https://github.com/yoshoku/numo-openblas/workflows/build/badge.svg)](https://github.com/yoshoku/numo-openblas/actions?query=workflow%3Abuild)
4
4
  [![Gem Version](https://badge.fury.io/rb/numo-openblas.svg)](https://badge.fury.io/rb/numo-openblas)
5
- [![BSD 3-Clause License](https://img.shields.io/badge/License-BSD%203--Clause-orange.svg)](https://github.com/yoshoku/suika/blob/main/LICENSE.txt)
5
+ [![BSD 3-Clause License](https://img.shields.io/badge/License-BSD%203--Clause-orange.svg)](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
@@ -1,5 +1,5 @@
1
1
  target :lib do
2
- signature "sig"
2
+ signature "sig", "sig-deps"
3
3
 
4
4
  check "lib" # Directory name
5
5
  # check "Gemfile" # File name
@@ -8,23 +8,18 @@ require 'open-uri'
8
8
  require 'open3'
9
9
  require 'rubygems/package'
10
10
 
11
- OPENBLAS_VER = '0.3.15'
12
- OPENBLAS_KEY = 'd7d1f67c1ef0c14c93761bdf44f0da8d0dd4bc0f'
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::Liblinear
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");
@@ -5,6 +5,6 @@ module Numo
5
5
  # Numo::OpenBLAS loads Numo::NArray and Linalg with OpenBLAS used as backend library.
6
6
  module OpenBLAS
7
7
  # The version of Numo::OpenBLAS you install.
8
- VERSION = '0.4.0'
8
+ VERSION = '0.4.4'
9
9
  end
10
10
  end
@@ -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.0
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-06-19 00:00:00.000000000 Z
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.1.6
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.
data/sig/patch.rbs DELETED
@@ -1,7 +0,0 @@
1
- module Numo
2
- module Linalg
3
- module Loader
4
- def self?.load_openblas: (*String dirs, ?exc: bool exc) -> bool
5
- end
6
- end
7
- end