numo-openblas 0.3.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c9bc16e4fbf80a0451a47d632fc079cc06afc593d2c76772dd644314f75c880
4
- data.tar.gz: 9464fe4bc6d7a9ec3b75a6bef24cacb122af0d0e9ec745ea20801e82c5d5ee1a
3
+ metadata.gz: 2fdbbab5dab6f7be0c058002b0fa93957d435b26f9d59168d6086fd0d4fba781
4
+ data.tar.gz: b685c5c97e3a48845d470cb9bed44568f7343a38516984a0fb6a9d62bc0955ce
5
5
  SHA512:
6
- metadata.gz: 850d4686ed9382c72e35eacd51a96fb90d2a22b2c5087dd30dc9ac6ad0886dd9d4246ecea6c601615461b95f1e135f4510b23732a475bd763977eb8ee5aca21c
7
- data.tar.gz: 1d75fc4aaeeb8185914470c9ab3ca55374688f14a0f2da559a52e08c388268902637cf95ff3990425cdc81babfe5310498716866fcd3e90b6d1519286f904306
6
+ metadata.gz: c9321441ce9d109dc259e9970719f41443f7edbe0103b4bb01c3f67c6b7713e353cbc35d6971fbb861eea4b43503e67874d6e75462e7b012bc12ea29af7b2464
7
+ data.tar.gz: 4cc439f37deb7065352931943106c00cdaa0322521860567c727bf4f4b88816b28857c509a1485482e29e7478677816bf472b59fa0573f22df790914cb1b5212
@@ -8,17 +8,15 @@ jobs:
8
8
  strategy:
9
9
  fail-fast: false
10
10
  matrix:
11
- ruby: [ '2.5', '2.6', '2.7', '3.0' ]
11
+ ruby: [ '2.6', '2.7', '3.0' ]
12
12
  steps:
13
13
  - uses: actions/checkout@v2
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.3
2
+ - Change the version of OpenBLAS to be downloaded to 0.3.17.
3
+ - Refactor build script.
4
+
5
+ ## 0.4.2
6
+ - Change the version of OpenBLAS to be downloaded to 0.3.16.
7
+ - Fix API documentation.
8
+
9
+ ## 0.4.1
10
+ - Remove dependent gem's type declaration file from installation files.
11
+
12
+ ## 0.4.0
13
+ - Add type declaration file: sig/numo/openblas.rbs
14
+
1
15
  ## 0.3.2
2
16
  - Change the version of OpenBLAS to be downloaded to 0.3.15.
3
17
 
data/Gemfile CHANGED
@@ -6,3 +6,5 @@ gemspec
6
6
  gem 'rake', '~> 13.0'
7
7
  gem 'rake-compiler', '~> 1.0'
8
8
  gem 'rspec', '~> 3.0'
9
+ gem 'rbs', '~> 1.2'
10
+ gem 'steep', '~> 0.44'
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 ADDED
@@ -0,0 +1,20 @@
1
+ target :lib do
2
+ signature "sig", "sig-deps"
3
+
4
+ check "lib" # Directory name
5
+ # check "Gemfile" # File name
6
+ # check "app/models/**/*.rb" # Glob
7
+ # # ignore "lib/templates/*.rb"
8
+ #
9
+ # # library "pathname", "set" # Standard libraries
10
+ # library "numo-narray", "numo-linalg" # Gems
11
+ end
12
+
13
+ # target :spec do
14
+ # signature "sig", "sig-private"
15
+ #
16
+ # check "spec"
17
+ #
18
+ # # library "pathname", "set" # Standard libraries
19
+ # # library "rspec"
20
+ # end
@@ -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.17'
12
+ OPENBLAS_KEY = '0de2c8a2feb12183cce6222f1e963f7e254a23a2'
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.3.2'
8
+ VERSION = '0.4.3'
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) }
@@ -0,0 +1,8 @@
1
+ module Numo
2
+ module OpenBLAS
3
+ VERSION: String
4
+ OPENBLAS_CHAR_CORENAME: String
5
+ OPENBLAS_NUM_CORES: Integer
6
+ OPENBLAS_VERSION: String
7
+ end
8
+ end
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.3.2
4
+ version: 0.4.3
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-05-22 00:00:00.000000000 Z
11
+ date: 2021-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: numo-linalg
@@ -43,11 +43,13 @@ files:
43
43
  - LICENSE.txt
44
44
  - README.md
45
45
  - Rakefile
46
+ - Steepfile
46
47
  - ext/numo/openblas/extconf.rb
47
48
  - ext/numo/openblas/openblas.c
48
49
  - lib/numo/openblas.rb
49
50
  - lib/numo/openblas/version.rb
50
51
  - numo-openblas.gemspec
52
+ - sig/numo/openblas.rbs
51
53
  - vendor/tmp/.gitkeep
52
54
  homepage: https://github.com/yoshoku/numo-openblas
53
55
  licenses:
@@ -57,7 +59,7 @@ metadata:
57
59
  source_code_uri: https://github.com/yoshoku/numo-openblas
58
60
  changelog_uri: https://github.com/yoshoku/numo-openblas/blob/main/CHANGELOG.md
59
61
  documentation_uri: https://github.com/yoshoku/numo-openblas/blob/main/README.md
60
- post_install_message:
62
+ post_install_message:
61
63
  rdoc_options: []
62
64
  require_paths:
63
65
  - lib
@@ -72,8 +74,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
74
  - !ruby/object:Gem::Version
73
75
  version: '0'
74
76
  requirements: []
75
- rubygems_version: 3.1.6
76
- signing_key:
77
+ rubygems_version: 3.2.22
78
+ signing_key:
77
79
  specification_version: 4
78
80
  summary: Numo::OpenBLAS downloads and builds OpenBLAS during installation and uses
79
81
  that as a background library for Numo::Linalg.