tensor_stream-opencl 0.1.0 → 0.1.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d33b253833ef9d0db6be85834b2af716d5c2b1fb
|
4
|
+
data.tar.gz: b2e18fcf323ff2353bd251c0d6a9d01c6ef7d729
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3933ab4454e758dd9bdfd0bf3bff4c856369da6704f6ded41e35ff50a271b259381eadda0e285a95d92a4f277975da56fb084cc03fb4b408403ace6021a146d9
|
7
|
+
data.tar.gz: 5f39e60e3b435d24a49cbeb0af399545c98a031999a26ff07f4c4d6badef58ce3799b5c39dfbe2f3899a2dd44b729b61cdd7e6b9a47f8a5d35e5b6487626fcc4
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
tensor_stream-opencl (0.1.
|
4
|
+
tensor_stream-opencl (0.1.1)
|
5
5
|
opencl_ruby_ffi
|
6
6
|
tensor_stream
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
+
chunky_png (1.3.10)
|
11
12
|
concurrent-ruby (1.0.5)
|
12
13
|
deep_merge (1.2.1)
|
13
14
|
diff-lcs (1.3)
|
@@ -34,7 +35,8 @@ GEM
|
|
34
35
|
diff-lcs (>= 1.2.0, < 2.0)
|
35
36
|
rspec-support (~> 3.8.0)
|
36
37
|
rspec-support (3.8.0)
|
37
|
-
tensor_stream (0.8.
|
38
|
+
tensor_stream (0.8.5)
|
39
|
+
chunky_png
|
38
40
|
concurrent-ruby
|
39
41
|
deep_merge
|
40
42
|
|
@@ -2,5 +2,5 @@
|
|
2
2
|
% a_dtype = dtype_to_c_type(a)
|
3
3
|
% b_dtype = dtype_to_c_type(b)
|
4
4
|
% op = operator_to_c(fname)
|
5
|
-
<%= render 'bool_operand.cl', a_dtype: a_dtype, b_dtype: b_dtype, op: op, fname: fname, dtype: "#{a}_#{b}", result_t: '
|
5
|
+
<%= render 'bool_operand.cl', a_dtype: a_dtype, b_dtype: b_dtype, op: op, fname: fname, dtype: "#{a}_#{b}", result_t: 'uchar' %>
|
6
6
|
% end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
% c_dtype = dtype_to_c_type(dtype)
|
2
|
-
__kernel void where_<%= dtype %>(const int M, const int N, __global const
|
2
|
+
__kernel void where_<%= dtype %>(const int M, const int N, __global const uchar *PRED, __global const <%= c_dtype %> *A, __global const <%= c_dtype %> *B, __global <%= c_dtype %> *C) {
|
3
3
|
// Get the index of the current element to be processed
|
4
4
|
const int globalRow = get_global_id(0); // Row ID of C (0..M)
|
5
5
|
const int globalCol = get_global_id(1); // Col ID of C (0..N)
|
@@ -5,7 +5,7 @@ require 'tensor_stream/evaluator/buffer'
|
|
5
5
|
require 'tensor_stream/opencl/opencl_buffer'
|
6
6
|
require 'tensor_stream/opencl/opencl_template_helper'
|
7
7
|
require 'tensor_stream/device'
|
8
|
-
require 'tensor_stream/
|
8
|
+
require 'tensor_stream/opencl/opencl_device'
|
9
9
|
require 'opencl_ruby_ffi'
|
10
10
|
require 'narray_ffi'
|
11
11
|
require 'tensor_stream/evaluator/base_evaluator'
|
@@ -781,7 +781,7 @@ module TensorStream
|
|
781
781
|
when :int16
|
782
782
|
NArray.sint(narray_size)
|
783
783
|
when :boolean
|
784
|
-
NArray.
|
784
|
+
NArray.byte(narray_size)
|
785
785
|
when :unknown
|
786
786
|
nil
|
787
787
|
else
|