cumo 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -2
- data/README.md +7 -8
- data/ext/cumo/cumo.c +2 -2
- data/ext/cumo/include/cumo.h +2 -2
- data/ext/cumo/narray/ndloop.c +6 -1
- 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: 981428686ca946222ba4e575d35d55cc1139ae9a057afe11bb19166d189ddd4d
|
4
|
+
data.tar.gz: 88129353d1da98170baa4362b46032ffa49b236e7559f1c5e60a6bfa32192c7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f2cfcf951e787490e427ad6688e8003b7a0d9132e5cf1a030b78727561ddbf603df367e71169f91e926b67660b40f0b1c66f26ab30c744e8afb680d9568bfa7
|
7
|
+
data.tar.gz: 1c47cb15aa0676369c37cc8a77771e7b498b56fbcb7f8b6321db4c3a9c1a24e3cb8a1fdb37e9b72331441458458b943a36fe34bc2b01706998c9fa50d06413be
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# 0.2.4 (2018-11-21)
|
2
|
+
|
3
|
+
Changes:
|
4
|
+
|
5
|
+
* Turn off `CUMO_SHOW_WARNING` as default
|
6
|
+
|
1
7
|
# 0.2.3 (2018-11-17)
|
2
8
|
|
3
9
|
Enhancements:
|
@@ -17,8 +23,7 @@ Enhancements:
|
|
17
23
|
|
18
24
|
Enhancements:
|
19
25
|
|
20
|
-
* Add `CUMO_SHOW_WARNING` and `CUMO_SHOW_WARNING_ONCE` environment variables to suppress cumo warnings.
|
21
|
-
* They are only for debug purpose, would be removed in future.
|
26
|
+
* Add `CUMO_SHOW_WARNING` and `CUMO_SHOW_WARNING_ONCE` environment variables to suppress cumo warnings (They are only for debug purpose, would be removed in future).
|
22
27
|
|
23
28
|
# 0.2.0 (2018-11-12)
|
24
29
|
|
data/README.md
CHANGED
@@ -104,9 +104,9 @@ You may enable or disable `compatible_mode` as:
|
|
104
104
|
```
|
105
105
|
require 'cumo'
|
106
106
|
Cumo.enable_compatible_mode # enable
|
107
|
-
Cumo.
|
107
|
+
Cumo.compatible_mode_enabled? #=> true
|
108
108
|
Cumo.disable_compatible_mode # disable
|
109
|
-
Cumo.
|
109
|
+
Cumo.compatible_mode_enabled? #=> false
|
110
110
|
```
|
111
111
|
|
112
112
|
You can also use following methods which behaves as Numo NArray's methods. Behaviors of these methods do not depend on `compatible_mode`.
|
@@ -242,17 +242,16 @@ bundle exec DTYPE=dfloat ruby test/narray_test.rb
|
|
242
242
|
bundle exec CUDA_LAUNCH_BLOCKING=1
|
243
243
|
```
|
244
244
|
|
245
|
-
###
|
245
|
+
### Show GPU synchnoziation warnings
|
246
246
|
|
247
|
-
|
248
|
-
|
249
|
-
It is possible to disable by followings:
|
247
|
+
Cumo shows warnings if CPU and GPU synchronization occurs if:
|
250
248
|
|
251
249
|
```
|
252
|
-
export CUMO_SHOW_WARNING=
|
250
|
+
export CUMO_SHOW_WARNING=ON
|
253
251
|
```
|
254
252
|
|
255
|
-
|
253
|
+
As default, it shows warnings occurred at the same place only once.
|
254
|
+
You may want to show warnings everytime rather than once as:
|
256
255
|
|
257
256
|
```
|
258
257
|
export CUMO_SHOW_WARNING=ON
|
data/ext/cumo/cumo.c
CHANGED
@@ -124,9 +124,9 @@ Init_cumo()
|
|
124
124
|
env = getenv("CUMO_COMPATIBLE_MODE");
|
125
125
|
cumo_compatible_mode_enabled = (env != NULL && strcmp(env, "OFF") != 0 && strcmp(env, "0") != 0 && strcmp(env, "NO") != 0);
|
126
126
|
|
127
|
-
// default is
|
127
|
+
// default is false
|
128
128
|
env = getenv("CUMO_SHOW_WARNING");
|
129
|
-
cumo_show_warning_enabled = env
|
129
|
+
cumo_show_warning_enabled = (env != NULL && strcmp(env, "OFF") != 0 && strcmp(env, "0") != 0 && strcmp(env, "NO") != 0);
|
130
130
|
|
131
131
|
// default is true
|
132
132
|
env = getenv("CUMO_SHOW_WARNING_ONCE");
|
data/ext/cumo/include/cumo.h
CHANGED
data/ext/cumo/narray/ndloop.c
CHANGED
@@ -183,6 +183,9 @@ print_ndloop(cumo_na_md_loop_t *lp) {
|
|
183
183
|
printf(" xargs[%d].bufcp->ndim = %d\n", j, lp->xargs[j].bufcp->ndim);
|
184
184
|
printf(" xargs[%d].bufcp->elmsz = %"SZF"d\n", j, lp->xargs[j].bufcp->elmsz);
|
185
185
|
printf(" xargs[%d].bufcp->n = 0x%"SZF"x\n", j, (size_t)lp->xargs[j].bufcp->n);
|
186
|
+
for (i=0; i<=lp->xargs[j].bufcp->ndim; i++) {
|
187
|
+
printf(" xargs[%d].bufcp->n[%d] = %"SZF"u\n", j, i, lp->xargs[j].bufcp->n[i]);
|
188
|
+
}
|
186
189
|
printf(" xargs[%d].bufcp->src_ptr = 0x%"SZF"x\n", j, (size_t)lp->xargs[j].bufcp->src_ptr);
|
187
190
|
printf(" xargs[%d].bufcp->buf_ptr = 0x%"SZF"x\n", j, (size_t)lp->xargs[j].bufcp->buf_ptr);
|
188
191
|
printf(" xargs[%d].bufcp->src_iter = 0x%"SZF"x\n", j, (size_t)lp->xargs[j].bufcp->src_iter);
|
@@ -1256,7 +1259,7 @@ ndloop_copy_from_buffer(cumo_na_buffer_copy_t *lp)
|
|
1256
1259
|
DBG(for (j=0; j<elmsz/8; j++) {printf("%g,",((double*)(src))[j]);});
|
1257
1260
|
goto loop_end;
|
1258
1261
|
}
|
1259
|
-
// initialize loop counter
|
1262
|
+
// initialize loop counter. c[i] indicates an element index of i-th dim.
|
1260
1263
|
c = ALLOCA_N(size_t, nd+1);
|
1261
1264
|
for (i=0; i<=nd; i++) c[i]=0;
|
1262
1265
|
// loop body
|
@@ -1283,6 +1286,8 @@ ndloop_copy_from_buffer(cumo_na_buffer_copy_t *lp)
|
|
1283
1286
|
DBG(for (j=0; j<elmsz/8; j++) {printf("%g,",((double*)(src))[j]);});
|
1284
1287
|
buf_pos += elmsz;
|
1285
1288
|
// count up
|
1289
|
+
// ++c[i] and goes to the next element of i-th dim if c[i] < lp->n[i]
|
1290
|
+
// If c[i] == lp->n[i], a loop for i-th dim ends. Goes to (i-1)-th dim.
|
1286
1291
|
for (;;) {
|
1287
1292
|
if (i<=0) goto loop_end;
|
1288
1293
|
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.4
|
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-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: numo-narray
|