README.md in cumo-0.1.0 vs README.md in cumo-0.1.1
- old
+ new
@@ -3,14 +3,15 @@
# Cumo
Cumo (pronounced like "koomo") is CUDA-aware numerical library whose interface is highly compatible with [Ruby Numo](https://github.com/ruby-numo).
This library provides the benefit of speedup using GPU by replacing Numo with only a small piece of codes.
+<img src="https://raw.githubusercontent.com/sonots/cumo-logo/master/logo_transparent.png" alt="cumo logo" title="cumo logo" width="50%">
## Requirements
-* Ruby 2.0 or later
+* Ruby 2.5 or later
* NVIDIA GPU Compute Capability 6.0 (Pascal) or later
* CUDA 9.0 or later
## Preparation
@@ -167,27 +168,10 @@
```
bundle exec rake docs
```
-## Source code organizations
-
-* `*_kernel.{h,cuh,cu}` files are for device (CUDA kernels).
- * .cu files are compiled via nvcc.
- * .cu files define C wrapper functions to launch CUDA kernels to enable to be called from .c files.
- * Technically, it is not possible to use CRuby API such as `VALUE` in .cu files.
- * CRuby API is not callable from CUDA kernel because they do not have `__device__` modifier.
- * nvcc does not support `#include RUBY_EXTCONF_H`, so can not include `ruby.h`.
- * (RULE) It is allowed to use C++14 codes in .cu files.
-* Rest of `*.{h,c}` files are for host (CPU).
- * Call C wrapper functions defined in .cu files.
- * It can use CRuby API.
- * (RULE) It is not allowed to use C++ codes in host files.
-
-Ruby's `mkmf` (or `extconf.rb`) does not support to specify 3rd compiler such as NVCC for another files of extensions `.cu`.
-Therefore, cumo specify a wrapper command `bin/mkmf-cu-nvcc` as a compiler and changes its behavor depending on extensions of files to compile.
-
## Advanced Tips on Development
### ccache
[ccache](https://ccache.samba.org/) would be useful to speedup compilation time.
@@ -199,29 +183,25 @@
ln -sf "$HOME/opt/ccache/bin/ccache" "$HOME/opt/ccache/bin/gcc"
ln -sf "$HOME/opt/ccache/bin/ccache" "$HOME/opt/ccache/bin/g++"
ln -sf "$HOME/opt/ccache/bin/ccache" "$HOME/opt/ccache/bin/nvcc"
```
-## Run tests only a specific line
+### Build in parallel
-`--location` option is available as:
+Use `MAKEFLAGS` environment variable to specify `make` command options. You can build in parallel as:
```
-bundle exec ruby test/narray_test.rb --location 121
+bundle exec MAKEFLAG=-j8 rake compile
```
-### Compile and run tests only a specific type
+### Specify nvcc --generate-code options
-`DTYPE` environment variable is available as:
-
```
-bundle exec DTYPE=dfloat rake compile
+bundle exec env CUMO_NVCC_GENERATE_CODE=arch=compute_60,code=sm_60 rake compile
```
-```
-bundle exec DTYPE=dfloat ruby test/narray_test.rb
-```
+This is useful even on development because it makes possible to skip JIT compilation of PTX to cubin occurring on runtime.
### Run tests with gdb
Compile with debug option:
@@ -235,10 +215,29 @@
bundle exec gdb -x run.gdb --args ruby test/narray_test.rb
```
You may put a breakpoint by calling `cumo_debug_breakpoint()` at C source codes.
+### Run tests only a specific line
+`--location` option is available as:
+
+```
+bundle exec ruby test/narray_test.rb --location 121
+```
+
+### Compile and run tests only a specific type
+
+`DTYPE` environment variable is available as:
+
+```
+bundle exec DTYPE=dfloat rake compile
+```
+
+```
+bundle exec DTYPE=dfloat ruby test/narray_test.rb
+```
+
### Run program always synchronizing CPU and GPU
```
bundle exec CUDA_LAUNCH_BLOCKING=1
```
@@ -247,6 +246,11 @@
Bug reports and pull requests are welcome on GitHub at https://github.com/sonots/cumo.
## License
-[LICENSE.txt](./LICENSE.txt)
+* [LICENSE.txt](./LICENSE.txt)
+* [3rd_party/LICENSE.txt](./3rd_party/LICENSE.txt)
+
+## Related Materials
+
+* [Fast Numerical Computing and Deep Learning in Ruby with Cumo](https://speakerdeck.com/sonots/fast-numerical-computing-and-deep-learning-in-ruby-with-cumo) - Presentation Slide at [RubyKaigi 2018](https://rubykaigi.org/2018/presentations/sonots.html#may31)