numo-openblas 0.4.2 → 0.4.3

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: 1e85f1e27fbff879cd1cafcb1b9d37b8050c15f15250a71fed1d579a59174185
4
- data.tar.gz: a92717c0e1e0d1296b59f15481ed743df2e91eaf7a1b528238b454f3f2f54fdc
3
+ metadata.gz: 2fdbbab5dab6f7be0c058002b0fa93957d435b26f9d59168d6086fd0d4fba781
4
+ data.tar.gz: b685c5c97e3a48845d470cb9bed44568f7343a38516984a0fb6a9d62bc0955ce
5
5
  SHA512:
6
- metadata.gz: 6d8c6725132b3c7fde79d031557fbd3f8a7927328d20afbe0f1104cf0a6ef7272e4782c75cacd0f52e13774f46a6b5bf5ef4b56700ec3eb862e1f4b407a0f06d
7
- data.tar.gz: c84021eca60b2943129e2cb9675bbd5183852f6a8c37df4a3c4de0afba899f1134d6a37c9a527850da7176291a0c0c2d420807ef1fbdff47eec3ab90006697cc
6
+ metadata.gz: c9321441ce9d109dc259e9970719f41443f7edbe0103b4bb01c3f67c6b7713e353cbc35d6971fbb861eea4b43503e67874d6e75462e7b012bc12ea29af7b2464
7
+ data.tar.gz: 4cc439f37deb7065352931943106c00cdaa0322521860567c727bf4f4b88816b28857c509a1485482e29e7478677816bf472b59fa0573f22df790914cb1b5212
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.4.3
2
+ - Change the version of OpenBLAS to be downloaded to 0.3.17.
3
+ - Refactor build script.
4
+
1
5
  ## 0.4.2
2
6
  - Change the version of OpenBLAS to be downloaded to 0.3.16.
3
7
  - Fix API documentation.
@@ -8,23 +8,18 @@ require 'open-uri'
8
8
  require 'open3'
9
9
  require 'rubygems/package'
10
10
 
11
- OPENBLAS_VER = '0.3.16'
12
- OPENBLAS_KEY = 'dbb76d2316a135a8e73c98c926c8a596b3bb233f'
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')
@@ -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.2'
8
+ VERSION = '0.4.3'
9
9
  end
10
10
  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.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-06 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