cumo 0.3.0.pre1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/ext/cumo/cuda/cudnn.c +2 -0
- data/ext/cumo/include/cumo.h +2 -2
- data/ext/cumo/narray/gen/tmpl/batch_norm.c +10 -10
- data/ext/cumo/narray/gen/tmpl/batch_norm_backward.c +7 -7
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2ed7641113820552c74682336a8a7a92cce11e8897a4b6e0d9f9d416431242d
|
4
|
+
data.tar.gz: b5e6a459c3bf096991587a40c7b1efeba3aa1b2004e37604d3adf5fc7dce68ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86cdf6a12b38ebb87c672cc0cb87ed7a51a2b37fc5fdf0b21d386ac4446afa102952da69e8799130abef8420b2bf6cd09836d6d14832b8ca2d4693f0718275e8
|
7
|
+
data.tar.gz: 0f881077419ee9ca3c4b5b09fcf01e35be9884cca9d736745bdd45c5f8c3fab8b856a0c336f486ac12f26209d81f2128b8eefbcdbd3b240259ca21479dd13f41
|
data/CHANGELOG.md
CHANGED
data/ext/cumo/cuda/cudnn.c
CHANGED
@@ -73,8 +73,10 @@ Init_cumo_cuda_cudnn(void)
|
|
73
73
|
eCUDNNError = rb_define_class_under(mCUDA, "CUDNNError", rb_eStandardError);
|
74
74
|
|
75
75
|
rb_define_singleton_method(mCUDNN, "available?", RUBY_METHOD_FUNC(rb_cudnn_available_p), 0);
|
76
|
+
#ifdef CUDNN_FOUND
|
76
77
|
rb_define_const(mCUDNN, "CUDNN_POOLING_MAX", INT2NUM(CUDNN_POOLING_MAX));
|
77
78
|
rb_define_const(mCUDNN, "CUDNN_POOLING_MAX_DETERMINISTIC", INT2NUM(CUDNN_POOLING_MAX_DETERMINISTIC));
|
78
79
|
rb_define_const(mCUDNN, "CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING", INT2NUM(CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING));
|
79
80
|
rb_define_const(mCUDNN, "CUDNN_POOLING_AVERAGE_COUNT_EXCLUDE_PADDING", INT2NUM(CUDNN_POOLING_AVERAGE_COUNT_EXCLUDE_PADDING));
|
81
|
+
#endif // CUDNN_FOUND
|
80
82
|
}
|
data/ext/cumo/include/cumo.h
CHANGED
@@ -37,9 +37,9 @@ static VALUE
|
|
37
37
|
};
|
38
38
|
VALUE opts[] = {Qundef, Qundef, Qundef, Qundef, Qundef, Qundef, Qundef, Qundef};
|
39
39
|
|
40
|
-
cumo_narray_t *nx, *ngamma, *nbeta;
|
41
|
-
size_t *x_shape
|
42
|
-
size_t x_ndim
|
40
|
+
cumo_narray_t *nx; // , *ngamma, *nbeta;
|
41
|
+
size_t *x_shape; // *gamma_shape, *beta_shape, reduced_shape[CUMO_NA_MAX_DIMENSION];
|
42
|
+
size_t x_ndim;
|
43
43
|
|
44
44
|
VALUE x_cont, gamma_cont, beta_cont;
|
45
45
|
cudnnTensorDescriptor_t x_desc = 0;
|
@@ -97,18 +97,18 @@ static VALUE
|
|
97
97
|
}
|
98
98
|
|
99
99
|
CumoGetNArray(x, nx);
|
100
|
-
CumoGetNArray(gamma, ngamma);
|
101
|
-
CumoGetNArray(beta, nbeta);
|
100
|
+
// CumoGetNArray(gamma, ngamma);
|
101
|
+
// CumoGetNArray(beta, nbeta);
|
102
102
|
x_ndim = nx->ndim;
|
103
103
|
x_shape = nx->shape;
|
104
|
-
gamma_ndim = ngamma->ndim;
|
105
|
-
gamma_shape = ngamma->shape;
|
106
|
-
beta_ndim = nbeta->ndim;
|
107
|
-
beta_shape = nbeta->shape;
|
104
|
+
// gamma_ndim = ngamma->ndim;
|
105
|
+
// gamma_shape = ngamma->shape;
|
106
|
+
// beta_ndim = nbeta->ndim;
|
107
|
+
// beta_shape = nbeta->shape;
|
108
108
|
|
109
109
|
// TODO: Size check of gammma, beta, running_mean, running_var, mean, inv_std
|
110
110
|
// are equivalent with either of reduced_shape(keepdims: false) or reduced_shape(keepdims: true)
|
111
|
-
reduced_ndim = cumo_cuda_cudnn_ReduceShape(reduced_shape, x_ndim, x_shape, axis_ndim, int_axis, 1);
|
111
|
+
// reduced_ndim = cumo_cuda_cudnn_ReduceShape(reduced_shape, x_ndim, x_shape, axis_ndim, int_axis, 1);
|
112
112
|
// CUMO_CUDA_CUDNN_CHECK_DIM_EQ(reduced_ndim, gamma_ndim);
|
113
113
|
// CUMO_CUDA_CUDNN_CHECK_DIM_EQ(reduced_ndim, beta_ndim);
|
114
114
|
// for (size_t idim = 0; idim < reduced_ndim; ++idim) {
|
@@ -36,9 +36,9 @@ static VALUE
|
|
36
36
|
};
|
37
37
|
VALUE opts[] = {Qundef, Qundef, Qundef, Qundef, Qundef, Qundef, Qundef};
|
38
38
|
|
39
|
-
cumo_narray_t *nx, *ngamma, *ngy;
|
40
|
-
size_t *x_shape, *gamma_shape, *gy_shape, reduced_shape[CUMO_NA_MAX_DIMENSION];
|
41
|
-
size_t x_ndim, gamma_ndim, gy_ndim, reduced_ndim;
|
39
|
+
cumo_narray_t *nx, *ngamma; // , *ngy;
|
40
|
+
size_t *x_shape, *gamma_shape; // , *gy_shape, reduced_shape[CUMO_NA_MAX_DIMENSION];
|
41
|
+
size_t x_ndim, gamma_ndim; // , gy_ndim, reduced_ndim;
|
42
42
|
|
43
43
|
VALUE x_cont, gamma_cont, gy_cont;
|
44
44
|
cudnnTensorDescriptor_t x_desc = 0;
|
@@ -84,17 +84,17 @@ static VALUE
|
|
84
84
|
|
85
85
|
CumoGetNArray(x, nx);
|
86
86
|
CumoGetNArray(gamma, ngamma);
|
87
|
-
CumoGetNArray(gy, ngy);
|
87
|
+
// CumoGetNArray(gy, ngy);
|
88
88
|
x_ndim = nx->ndim;
|
89
89
|
x_shape = nx->shape;
|
90
90
|
gamma_ndim = ngamma->ndim;
|
91
91
|
gamma_shape = ngamma->shape;
|
92
|
-
gy_ndim = ngy->ndim;
|
93
|
-
gy_shape = ngy->shape;
|
92
|
+
// gy_ndim = ngy->ndim;
|
93
|
+
// gy_shape = ngy->shape;
|
94
94
|
|
95
95
|
// TODO: Size check of gammma, beta, running_mean, running_var, mean, inv_std
|
96
96
|
// are equivalent with either of reduced_shape(keepdims: false) or reduced_shape(keepdims: true)
|
97
|
-
reduced_ndim = cumo_cuda_cudnn_ReduceShape(reduced_shape, x_ndim, x_shape, axis_ndim, int_axis, 1);
|
97
|
+
// reduced_ndim = cumo_cuda_cudnn_ReduceShape(reduced_shape, x_ndim, x_shape, axis_ndim, int_axis, 1);
|
98
98
|
// CUMO_CUDA_CUDNN_CHECK_DIM_EQ(reduced_ndim, gamma_ndim);
|
99
99
|
// for (size_t idim = 0; idim < reduced_ndim; ++idim) {
|
100
100
|
// CUMO_CUDA_CUDNN_CHECK_DIM_EQ(reduced_shape[idim], gamma_shape[idim]);
|
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.3.0
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: numo-narray
|
@@ -355,9 +355,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
355
355
|
version: '0'
|
356
356
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
357
357
|
requirements:
|
358
|
-
- - "
|
358
|
+
- - ">="
|
359
359
|
- !ruby/object:Gem::Version
|
360
|
-
version:
|
360
|
+
version: '0'
|
361
361
|
requirements: []
|
362
362
|
rubyforge_project:
|
363
363
|
rubygems_version: 2.7.6
|