cumo 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +8 -8
- data/ext/cumo/include/cumo.h +2 -2
- data/ext/cumo/narray/gen/tmpl/to_a.c +1 -1
- data/ext/cumo/narray/ndloop.c +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e5501440404744a0b6980679ea26ddde26969d50954e96025e7e561264f66c6
|
4
|
+
data.tar.gz: 8c34c90b27aa7c6dc75bfa712d16178113e6f725f9e6fcaf7cb4cdb4daf3c556
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 788891f3d1a7397f8d0dd8213d7fbc9bac536bbaff5d1bdc87502501367182a3cad8b3e48542ba94951d16cd2fd7b90ada9190e56dda81199c3d9eff905bc4ce
|
7
|
+
data.tar.gz: 44782255ca4e27c4ac01b6596a833a0796fdc849fea4d64e8b0109810a638b6ae8f55ccc5ac8db216d48c7402c0597124f63e0e9afcf198961e06bba667824ef
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
**This project is still under development. This project received grant from [Ruby Association Grant 2017](http://www.ruby.or.jp/ja/news/20171206).**
|
2
|
-
|
3
1
|
# Cumo
|
4
2
|
|
5
3
|
Cumo (pronounced like "koomo") is CUDA-aware numerical library whose interface is highly compatible with [Ruby Numo](https://github.com/ruby-numo).
|
@@ -78,13 +76,13 @@ If you want to switch Numo and Cumo dynamically, following snippets should work:
|
|
78
76
|
```ruby
|
79
77
|
if gpu
|
80
78
|
require 'cumo/narray'
|
81
|
-
|
79
|
+
xm = Cumo
|
82
80
|
else
|
83
81
|
require 'numo/narray'
|
84
|
-
|
82
|
+
xm = Numo
|
85
83
|
end
|
86
84
|
|
87
|
-
a =
|
85
|
+
a = xm::DFloat.new(3,5).seq
|
88
86
|
```
|
89
87
|
|
90
88
|
### Incompatibility With Numo
|
@@ -131,19 +129,21 @@ where `id` is an integer.
|
|
131
129
|
|
132
130
|
### Disable GPU Memory Pool
|
133
131
|
|
134
|
-
|
132
|
+
GPU memory pool is enabled as default. To disable, set `CUMO_MEMORY_POOL=OFF` environment variable , or
|
135
133
|
|
136
134
|
```
|
137
135
|
require 'cumo'
|
138
136
|
Cumo::CUDA::MemoryPool.disable
|
139
137
|
```
|
140
138
|
|
141
|
-
if you found GPU memory pool implementation has a bug.
|
142
|
-
|
143
139
|
## Documentation
|
144
140
|
|
145
141
|
See https://github.com/ruby-numo/numo-narray#documentation and replace Numo to Cumo.
|
146
142
|
|
143
|
+
## Contributions
|
144
|
+
|
145
|
+
This project is still under development. See [issues](https://github.com/sonots/cumo/issues) for future works.
|
146
|
+
|
147
147
|
## Development
|
148
148
|
|
149
149
|
Install ruby dependencies:
|
data/ext/cumo/include/cumo.h
CHANGED
@@ -11,7 +11,6 @@ static void
|
|
11
11
|
CUMO_INIT_PTR_IDX(lp, 0, p1, s1, idx1);
|
12
12
|
a = rb_ary_new2(i);
|
13
13
|
rb_ary_push(lp->args[1].value, a);
|
14
|
-
//CUMO_SHOW_SYNCHRONIZE_FIXME_WARNING_ONCE("<%=name%>", "<%=type_name%>");
|
15
14
|
if (idx1) {
|
16
15
|
for (; i--;) {
|
17
16
|
CUMO_GET_DATA_INDEX(p1,idx1,dtype,x);
|
@@ -38,6 +37,7 @@ static VALUE
|
|
38
37
|
cumo_ndfunc_arg_in_t ain[3] = {{Qnil,0},{cumo_sym_loop_opt},{cumo_sym_option}};
|
39
38
|
cumo_ndfunc_arg_out_t aout[1] = {{rb_cArray,0}}; // dummy?
|
40
39
|
cumo_ndfunc_t ndf = { <%=c_iter%>, CUMO_FULL_LOOP_NIP, 3, 1, ain, aout };
|
40
|
+
CUMO_SHOW_SYNCHRONIZE_WARNING_ONCE("<%=name%>", "<%=type_name%>");
|
41
41
|
cumo_cuda_runtime_check_status(cudaDeviceSynchronize());
|
42
42
|
return cumo_na_ndloop_cast_narray_to_rarray(&ndf, self, Qnil);
|
43
43
|
}
|
data/ext/cumo/narray/ndloop.c
CHANGED
@@ -1264,6 +1264,8 @@ ndloop_copy_from_buffer(cumo_na_buffer_copy_t *lp)
|
|
1264
1264
|
// i-th dimension
|
1265
1265
|
for (; i<nd; i++) {
|
1266
1266
|
if (LITER_SRC(lp,i).idx) {
|
1267
|
+
CUMO_SHOW_SYNCHRONIZE_FIXME_WARNING_ONCE("ndloop_copy_from_buffer", "any");
|
1268
|
+
cumo_cuda_runtime_check_status(cudaDeviceSynchronize());
|
1267
1269
|
LITER_SRC(lp,i+1).pos = LITER_SRC(lp,i).pos + LITER_SRC(lp,i).idx[c[i]];
|
1268
1270
|
} else {
|
1269
1271
|
LITER_SRC(lp,i+1).pos = LITER_SRC(lp,i).pos + LITER_SRC(lp,i).step*c[i];
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cumo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: numo-narray
|