numo-openblas 0.4.8 → 0.4.10

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: da2b2e38346c3d4b9cd8fd5394e9efda46d640af065318cd1a9f949bd39542cb
4
- data.tar.gz: 6dd25aa74b00a354abe64cf92bdf2f298946adadc3ed12fddde80f704ce06553
3
+ metadata.gz: 3727204342344f16515ccd3e4bddd8f145df8a672ee1b900a58298e416b3daae
4
+ data.tar.gz: 6579a0317755f177e119077d76491b9c87a7483f29beee08d480a1c13c6fb3bc
5
5
  SHA512:
6
- metadata.gz: 80a41adb9b479160c2300ebabed54bbcf5245d9b973bf8ffe0a936f95542de03639251ec05b8f600bac79a69bad2f6b0e2edd1ce45a6001d05c9b2252fcb4ba5
7
- data.tar.gz: 8617d4b184922a945de55db1c1fa61cf7a3088a206ec8336036aeb105f7cef81e83fa8d5d169ed4e2c73c50f9751b5b08071c0ead0666cff9eb4b90db11c134d
6
+ metadata.gz: c5f8576676fb7739e0b9a652fbb47c4896957999e57fc4b83547422b4f43c93de49a07c03d79c333ddba1037a09d289ec74e2ff63248c8df6d6215c23745f3bb
7
+ data.tar.gz: d7b8052022a948d5cd9a8f3a808da131d0db2ab1606d01fe3e385ac4e2ef02329a8b4acd764cf6fb2b9735b8b9f6ce4f906c2b0709a84081bb13563e143fd934
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 0.4.10
2
+ - Refactor extconf.rb with RuboCop.
3
+ - Change to check download file with MD5.
4
+ - Add vendor/bin directory to OpenBLAS load directory for Windows ([#2](https://github.com/yoshoku/numo-openblas/pull/2)).
5
+ - Since the author does not have a Windows PC, the operation cannot be confirmed.
6
+
7
+ ## 0.4.9
8
+ - Change the version of OpenBLAS to be downloaded to 0.3.23.
9
+
1
10
  ## 0.4.8
2
11
  - Change the version of OpenBLAS to be downloaded to 0.3.21.
3
12
 
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2020-2022 Atsushi Tatsuma
1
+ Copyright (c) 2020-2023 Atsushi Tatsuma
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
@@ -1,6 +1,6 @@
1
- # frozen-string-literal: true
1
+ # frozen_string_literal: true
2
2
 
3
- require 'digest/sha1'
3
+ require 'digest/md5'
4
4
  require 'etc'
5
5
  require 'fileutils'
6
6
  require 'mkmf'
@@ -8,17 +8,17 @@ require 'open-uri'
8
8
  require 'open3'
9
9
  require 'rubygems/package'
10
10
 
11
- OPENBLAS_VER = '0.3.21'
12
- OPENBLAS_KEY = 'b052d196ad694b29302e074b3eb8cc66745f6e2f'
11
+ OPENBLAS_VER = '0.3.23'
12
+ OPENBLAS_KEY = '115634b39007de71eb7e75cf7591dfb2'
13
13
  OPENBLAS_URI = "https://github.com/xianyi/OpenBLAS/archive/v#{OPENBLAS_VER}.tar.gz"
14
- OPENBLAS_DIR = File.expand_path(__dir__ + '/../../../vendor')
14
+ OPENBLAS_DIR = File.expand_path("#{__dir__}/../../../vendor")
15
15
 
16
16
  unless File.exist?("#{OPENBLAS_DIR}/installed_#{OPENBLAS_VER}")
17
- URI.open(OPENBLAS_URI) do |rf|
18
- File.open("#{OPENBLAS_DIR}/tmp/openblas.tgz", 'wb') { |sf| sf.write(rf.read) }
19
- end
17
+ URI.parse(OPENBLAS_URI).open { |f| File.binwrite("#{OPENBLAS_DIR}/tmp/openblas.tgz", f.read) }
20
18
 
21
- abort('SHA1 digest of downloaded file does not match.') if OPENBLAS_KEY != Digest::SHA1.file("#{OPENBLAS_DIR}/tmp/openblas.tgz").to_s
19
+ if Digest::MD5.file("#{OPENBLAS_DIR}/tmp/openblas.tgz").to_s != OPENBLAS_KEY
20
+ abort('MD5 digest of downloaded file does not match.')
21
+ end
22
22
 
23
23
  Gem::Package::TarReader.new(Zlib::GzipReader.open("#{OPENBLAS_DIR}/tmp/openblas.tgz")) do |tar|
24
24
  tar.each do |entry|
@@ -28,7 +28,7 @@ unless File.exist?("#{OPENBLAS_DIR}/installed_#{OPENBLAS_VER}")
28
28
  next if filename == File.dirname(filename)
29
29
 
30
30
  FileUtils.mkdir_p("#{OPENBLAS_DIR}/tmp/#{File.dirname(entry.full_name)}")
31
- File.open(filename, 'wb') { |f| f.write(entry.read) }
31
+ File.binwrite(filename, entry.read)
32
32
  File.chmod(entry.header.mode, filename)
33
33
  end
34
34
  end
@@ -36,11 +36,15 @@ unless File.exist?("#{OPENBLAS_DIR}/installed_#{OPENBLAS_VER}")
36
36
  Dir.chdir("#{OPENBLAS_DIR}/tmp/OpenBLAS-#{OPENBLAS_VER}") do
37
37
  mkstdout, _mkstderr, mkstatus = Open3.capture3("make -j#{Etc.nprocessors}")
38
38
  File.open("#{OPENBLAS_DIR}/tmp/openblas.log", 'w') { |f| f.puts(mkstdout) }
39
- abort("Failed to build OpenBLAS. Check the openblas.log file for more details: #{OPENBLAS_DIR}/tmp/openblas.log") unless mkstatus.success?
39
+ unless mkstatus.success?
40
+ abort("Failed to build OpenBLAS. Check the openblas.log file for more details: #{OPENBLAS_DIR}/tmp/openblas.log")
41
+ end
40
42
 
41
43
  insstdout, _insstderr, insstatus = Open3.capture3("make install PREFIX=#{OPENBLAS_DIR}")
42
44
  File.open("#{OPENBLAS_DIR}/tmp/openblas.log", 'a') { |f| f.puts(insstdout) }
43
- abort("Failed to install OpenBLAS. Check the openblas.log file for more details: #{OPENBLAS_DIR}/tmp/openblas.log") unless insstatus.success?
45
+ unless insstatus.success?
46
+ abort("Failed to install OpenBLAS. Check the openblas.log file for more details: #{OPENBLAS_DIR}/tmp/openblas.log")
47
+ end
44
48
 
45
49
  FileUtils.touch("#{OPENBLAS_DIR}/installed_#{OPENBLAS_VER}")
46
50
  end
@@ -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.8'
8
+ VERSION = '0.4.10'
9
9
  end
10
10
  end
data/lib/numo/openblas.rb CHANGED
@@ -1,8 +1,11 @@
1
- # frozen-string-literal: true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'numo/narray'
4
4
  require 'numo/linalg/linalg'
5
5
  require 'numo/openblas/version'
6
6
  require 'numo/openblas/openblas'
7
7
 
8
- Numo::Linalg::Loader.load_openblas(File.expand_path("#{__dir__}/../../vendor/lib/"))
8
+ Numo::Linalg::Loader.load_openblas(
9
+ File.expand_path("#{__dir__}/../../vendor/lib/"),
10
+ File.expand_path("#{__dir__}/../../vendor/bin/")
11
+ )
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.8
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-11 00:00:00.000000000 Z
11
+ date: 2023-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: numo-linalg
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  requirements: []
70
- rubygems_version: 3.2.33
70
+ rubygems_version: 3.3.26
71
71
  signing_key:
72
72
  specification_version: 4
73
73
  summary: Numo::OpenBLAS downloads and builds OpenBLAS during installation and uses