numo-openblas 0.2.0 → 0.3.2

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: eb28541f7f6f87b87410da68933898703b42d2987721e429b4d09ac7f1d23127
4
- data.tar.gz: ea7a198b2c3d3c17c7b03898d9c9b31a4c747335401b521ae4415c63b7a45c74
3
+ metadata.gz: 5c9bc16e4fbf80a0451a47d632fc079cc06afc593d2c76772dd644314f75c880
4
+ data.tar.gz: 9464fe4bc6d7a9ec3b75a6bef24cacb122af0d0e9ec745ea20801e82c5d5ee1a
5
5
  SHA512:
6
- metadata.gz: a2eec31d62b6cd6ee263b9219356835cb60fe52562dc2ab8090e7cb8261fa10de28eeb0c007a23d522def8af23a4d7d039ac5437f11270b2bc3e896e529ad645
7
- data.tar.gz: dc3b17590715bf76411eb71e29b9cad3afea8c5ae13b57070638d55b63460e17914c0142428ebbf2ab71853e6d94f9e56e183f175c8378737037fb7d557d5d8b
6
+ metadata.gz: 850d4686ed9382c72e35eacd51a96fb90d2a22b2c5087dd30dc9ac6ad0886dd9d4246ecea6c601615461b95f1e135f4510b23732a475bd763977eb8ee5aca21c
7
+ data.tar.gz: 1d75fc4aaeeb8185914470c9ab3ca55374688f14a0f2da559a52e08c388268902637cf95ff3990425cdc81babfe5310498716866fcd3e90b6d1519286f904306
@@ -0,0 +1,24 @@
1
+ name: build
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby: [ '2.5', '2.6', '2.7', '3.0' ]
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Install gcc and gfortran
15
+ run: sudo apt-get install -y gcc gfortran
16
+ - name: Set up Ruby ${{ matrix.ruby }}
17
+ uses: actions/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ - 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
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## 0.3.2
2
+ - Change the version of OpenBLAS to be downloaded to 0.3.15.
3
+
4
+ ## 0.3.1
5
+ - Change the version of OpenBLAS to be downloaded to 0.3.13.
6
+
7
+ ## 0.3.0
8
+ - Simplified code for loading of OpenBLAS library.
9
+
10
+ ## 0.2.2
11
+ - Change the version of OpenBLAS to be downloaded to 0.3.12.
12
+
13
+ ## 0.2.1
14
+ - Change the version of OpenBLAS to be downloaded to 0.3.11.
15
+
1
16
  ## 0.2.0
2
17
  - Add constant values about OpenBLAS.
3
18
  - Change to download and build OpenBLAS when building native extension.
data/Gemfile CHANGED
@@ -3,6 +3,6 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in numo-openblas.gemspec
4
4
  gemspec
5
5
 
6
- gem 'rake', '~> 12.0'
6
+ gem 'rake', '~> 13.0'
7
7
  gem 'rake-compiler', '~> 1.0'
8
8
  gem 'rspec', '~> 3.0'
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2020 Atsushi Tatsuma
1
+ Copyright (c) 2020-2021 Atsushi Tatsuma
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
data/README.md CHANGED
@@ -1,14 +1,24 @@
1
1
  # Numo::OpenBLAS
2
2
 
3
- [![Build Status](https://travis-ci.org/yoshoku/numo-openblas.svg?branch=master)](https://travis-ci.org/yoshoku/numo-openblas)
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/master/LICENSE.txt)
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)
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).
9
9
 
10
10
  ## Installation
11
11
 
12
+ Building LAPACK included with OpenBLAS requires Fortran compiler.
13
+
14
+ macOS:
15
+
16
+ $ brew install gfortran
17
+
18
+ Ubuntu:
19
+
20
+ $ sudo apt-get install gfortran
21
+
12
22
  Add this line to your application's Gemfile:
13
23
 
14
24
  ```ruby
@@ -39,9 +49,20 @@ c = x.transpose.dot(x)
39
49
  eig_val, eig_vec = Numo::Linalg.eigh(c)
40
50
  ```
41
51
 
52
+ Moreover, some of the build options are defined by constants.
53
+
54
+ ```ruby
55
+ > Numo::OpenBLAS::OPENBLAS_VERSION
56
+ => " OpenBLAS 0.3.10 "
57
+ > Numo::OpenBLAS::OPENBLAS_CHAR_CORENAME
58
+ => "HASWELL"
59
+ > Numo::OpenBLAS::OPENBLAS_NUM_CORES
60
+ => 8
61
+ ```
62
+
42
63
  ## Contributing
43
64
 
44
- Bug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/numo-openblas. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/yoshoku/numo-openblas/blob/master/CODE_OF_CONDUCT.md).
65
+ Bug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/numo-openblas. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/yoshoku/numo-openblas/blob/main/CODE_OF_CONDUCT.md).
45
66
 
46
67
  ## License
47
68
 
@@ -49,4 +70,4 @@ The gem is available as open source under the terms of the [BSD-3-Clause License
49
70
 
50
71
  ## Code of Conduct
51
72
 
52
- Everyone interacting in the Numo::Openblas project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yoshoku/numo-openblas/blob/master/CODE_OF_CONDUCT.md).
73
+ Everyone interacting in the Numo::Openblas project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yoshoku/numo-openblas/blob/main/CODE_OF_CONDUCT.md).
@@ -8,8 +8,8 @@ require 'open-uri'
8
8
  require 'open3'
9
9
  require 'rubygems/package'
10
10
 
11
- OPENBLAS_VER = '0.3.10'
12
- OPENBLAS_KEY = 'cbe3fdd0e6ee235debc611d76976dac62f3ddc1c'
11
+ OPENBLAS_VER = '0.3.15'
12
+ OPENBLAS_KEY = 'd7d1f67c1ef0c14c93761bdf44f0da8d0dd4bc0f'
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
 
@@ -44,7 +44,7 @@ unless File.exist?("#{OPENBLAS_DIR}/installed_#{OPENBLAS_VER}")
44
44
  File.open("#{OPENBLAS_DIR}/tmp/openblas.log", 'w') { |f| f.puts(mkstdout) }
45
45
  unless mkstatus.success?
46
46
  puts 'Failed to build OpenBLAS.'
47
- puts 'Check the make-openblas.log file for more details:'
47
+ puts 'Check the openblas.log file for more details:'
48
48
  puts "#{OPENBLAS_DIR}/tmp/openblas.log"
49
49
  exit(1)
50
50
  end
@@ -54,7 +54,7 @@ unless File.exist?("#{OPENBLAS_DIR}/installed_#{OPENBLAS_VER}")
54
54
  File.open("#{OPENBLAS_DIR}/tmp/openblas.log", 'a') { |f| f.puts(insstdout) }
55
55
  unless insstatus.success?
56
56
  puts 'Failed to install OpenBLAS.'
57
- puts 'Check the make-openblas.log file for more details:'
57
+ puts 'Check the openblas.log file for more details:'
58
58
  puts "#{OPENBLAS_DIR}/tmp/openblas.log"
59
59
  exit(1)
60
60
  end
data/lib/numo/openblas.rb CHANGED
@@ -5,27 +5,4 @@ require 'numo/linalg/linalg'
5
5
  require 'numo/openblas/version'
6
6
  require 'numo/openblas/openblas'
7
7
 
8
- module Numo
9
- module Linalg
10
- module Loader
11
- module_function
12
-
13
- def load_openblas
14
- dlext = case RbConfig::CONFIG['host_os']
15
- when /mswin|msys|mingw|cygwin/
16
- 'dll'
17
- when /darwin|mac os/
18
- 'dylib'
19
- else
20
- 'so'
21
- end
22
- openblas_path = File.expand_path(__dir__ + "/../../vendor/lib/libopenblas.#{dlext}")
23
- Numo::Linalg::Blas.dlopen(openblas_path)
24
- Numo::Linalg::Lapack.dlopen(openblas_path)
25
- @@libs = [openblas_path]
26
- end
27
- end
28
- end
29
- end
30
-
31
- Numo::Linalg::Loader.load_openblas
8
+ Numo::Linalg::Loader.load_openblas(File.expand_path("#{__dir__}/../../vendor/lib/"))
@@ -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.2.0'
8
+ VERSION = '0.3.2'
9
9
  end
10
10
  end
@@ -19,8 +19,8 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.metadata['homepage_uri'] = spec.homepage
21
21
  spec.metadata['source_code_uri'] = 'https://github.com/yoshoku/numo-openblas'
22
- spec.metadata['changelog_uri'] = 'https://github.com/yoshoku/numo-openblas/blob/master/CHANGELOG.md'
23
- spec.metadata['documentation_uri'] = 'https://github.com/yoshoku/numo-openblas/blob/master/README.md'
22
+ spec.metadata['changelog_uri'] = 'https://github.com/yoshoku/numo-openblas/blob/main/CHANGELOG.md'
23
+ spec.metadata['documentation_uri'] = 'https://github.com/yoshoku/numo-openblas/blob/main/README.md'
24
24
 
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.
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.2.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-01 00:00:00.000000000 Z
11
+ date: 2021-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: numo-linalg
@@ -34,9 +34,9 @@ extensions:
34
34
  - ext/numo/openblas/extconf.rb
35
35
  extra_rdoc_files: []
36
36
  files:
37
+ - ".github/workflows/build.yml"
37
38
  - ".gitignore"
38
39
  - ".rspec"
39
- - ".travis.yml"
40
40
  - CHANGELOG.md
41
41
  - CODE_OF_CONDUCT.md
42
42
  - Gemfile
@@ -55,9 +55,9 @@ licenses:
55
55
  metadata:
56
56
  homepage_uri: https://github.com/yoshoku/numo-openblas
57
57
  source_code_uri: https://github.com/yoshoku/numo-openblas
58
- changelog_uri: https://github.com/yoshoku/numo-openblas/blob/master/CHANGELOG.md
59
- documentation_uri: https://github.com/yoshoku/numo-openblas/blob/master/README.md
60
- post_install_message:
58
+ changelog_uri: https://github.com/yoshoku/numo-openblas/blob/main/CHANGELOG.md
59
+ documentation_uri: https://github.com/yoshoku/numo-openblas/blob/main/README.md
60
+ post_install_message:
61
61
  rdoc_options: []
62
62
  require_paths:
63
63
  - lib
@@ -72,8 +72,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
- rubygems_version: 3.1.2
76
- signing_key:
75
+ rubygems_version: 3.1.6
76
+ signing_key:
77
77
  specification_version: 4
78
78
  summary: Numo::OpenBLAS downloads and builds OpenBLAS during installation and uses
79
79
  that as a background library for Numo::Linalg.
data/.travis.yml DELETED
@@ -1,16 +0,0 @@
1
- ---
2
- os: linux
3
- dist: xenial
4
- language: ruby
5
- cache: bundler
6
- rvm:
7
- - '2.7'
8
-
9
- addons:
10
- apt:
11
- packages:
12
- - gcc
13
- - gfortran
14
-
15
- before_install:
16
- - gem install bundler -v 2.1.2