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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac2b9873bc48d45afcac57ff6e45ba84cc69ed1c61430cb13236a5c1ce018d0c
4
- data.tar.gz: c001063b6a66de3055f98789420d5574b5b2d53357624dc6ffbe750ce2f727f1
3
+ metadata.gz: 3e5501440404744a0b6980679ea26ddde26969d50954e96025e7e561264f66c6
4
+ data.tar.gz: 8c34c90b27aa7c6dc75bfa712d16178113e6f725f9e6fcaf7cb4cdb4daf3c556
5
5
  SHA512:
6
- metadata.gz: f18aa1652ddd921ae91da6f75e28a5b9338091111a07b1cc97b586b19e0a755fcb195b2307626a27f95def01845629ed710786f12932888a14e7dcfc55b0d034
7
- data.tar.gz: ed082b7188a9b517074eb78216fd0a15333ae84e7eeb271c6f7675d8c4bfecd0ef8ccf575017dfe450c75b85e5f275b801c11295e985be447cd9c08703601c86
6
+ metadata.gz: 788891f3d1a7397f8d0dd8213d7fbc9bac536bbaff5d1bdc87502501367182a3cad8b3e48542ba94951d16cd2fd7b90ada9190e56dda81199c3d9eff905bc4ce
7
+ data.tar.gz: 44782255ca4e27c4ac01b6596a833a0796fdc849fea4d64e8b0109810a638b6ae8f55ccc5ac8db216d48c7402c0597124f63e0e9afcf198961e06bba667824ef
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.2.3 (2018-11-17)
2
+
3
+ Enhancements:
4
+
5
+ * Add some missing `synchronize` workarounds
6
+
1
7
  # 0.2.2 (2018-11-13)
2
8
 
3
9
  Enhancements:
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
- Xumo = Cumo
79
+ xm = Cumo
82
80
  else
83
81
  require 'numo/narray'
84
- Xumo = Numo
82
+ xm = Numo
85
83
  end
86
84
 
87
- a = Xumo::DFloat.new(3,5).seq
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
- Set `CUMO_MEMORY_POOL=OFF` environment variable , or
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:
@@ -10,8 +10,8 @@ extern "C" {
10
10
  #endif
11
11
  #endif
12
12
 
13
- #define CUMO_VERSION "0.2.2"
14
- #define CUMO_VERSION_CODE 22
13
+ #define CUMO_VERSION "0.2.3"
14
+ #define CUMO_VERSION_CODE 23
15
15
 
16
16
  bool cumo_compatible_mode_enabled_p();
17
17
  bool cumo_show_warning_enabled_p();
@@ -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
  }
@@ -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.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-12 00:00:00.000000000 Z
11
+ date: 2018-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: numo-narray