Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/cunn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Sarofeen <csarofeen@nvidia.com>2017-04-18 20:37:25 +0300
committersoumith <soumith@fb.com>2017-04-18 21:07:58 +0300
commitea15d0d649edc52fc3e25a26a14c9bcc0070339a (patch)
tree2610b52ca85e81b78a64e95c4c4e5ae29364c0b9
parent956008538a0a1d165be64b063292dc7600f35e6a (diff)
Fused RNN kernel remove explicit instantiation, isn't needed.
-rw-r--r--lib/THCUNN/generic/FusedRNNKernel.cu62
1 files changed, 2 insertions, 60 deletions
diff --git a/lib/THCUNN/generic/FusedRNNKernel.cu b/lib/THCUNN/generic/FusedRNNKernel.cu
index 63c4ff9..17a6563 100644
--- a/lib/THCUNN/generic/FusedRNNKernel.cu
+++ b/lib/THCUNN/generic/FusedRNNKernel.cu
@@ -439,66 +439,8 @@ __global__ void
}
}
-// *********** START Generate specializations *************** //
-#define EXPAND_FUNCTION(ITYPE, DIM) \
- template __global__ void THNN_(GRUForward)<DATATYPE, ITYPE, DIM> \
- (TensorInfo<DATATYPE, ITYPE> inputI, \
- TensorInfo<DATATYPE, ITYPE> hiddenI, \
- TensorInfo<DATATYPE, ITYPE> bias1I, \
- TensorInfo<DATATYPE, ITYPE> bias2I, \
- TensorInfo<DATATYPE, ITYPE> hxI, \
- TensorInfo<DATATYPE, ITYPE> hyI, \
- ITYPE hsz, \
- ITYPE totalElements); \
- \
- template void __global__ THNN_(GRUBackward)<DATATYPE, ITYPE, DIM> \
- (TensorInfo<DATATYPE, ITYPE> inputI, \
- TensorInfo<DATATYPE, ITYPE> hiddenI, \
- TensorInfo<DATATYPE, ITYPE> gradoutputI, \
- TensorInfo<DATATYPE, ITYPE> gradinputI, \
- ITYPE hsz, \
- ITYPE totalElements); \
- \
- template void __global__ THNN_(LSTMForward)<DATATYPE, ITYPE, DIM> \
- (TensorInfo<DATATYPE, ITYPE> inputI, \
- TensorInfo<DATATYPE, ITYPE> hiddenI, \
- TensorInfo<DATATYPE, ITYPE> bias1I, \
- TensorInfo<DATATYPE, ITYPE> bias2I, \
- TensorInfo<DATATYPE, ITYPE> cxI, \
- TensorInfo<DATATYPE, ITYPE> hyI, \
- TensorInfo<DATATYPE, ITYPE> cyI, \
- ITYPE hsz, \
- ITYPE totalElements); \
- \
- template void __global__ THNN_(LSTMBackward)<DATATYPE, ITYPE, DIM> \
- (TensorInfo<DATATYPE, ITYPE> inputI, \
- TensorInfo<DATATYPE, ITYPE> hiddenI, \
- TensorInfo<DATATYPE, ITYPE> cxI, \
- TensorInfo<DATATYPE, ITYPE> cyI, \
- TensorInfo<DATATYPE, ITYPE> gradoutputI, \
- TensorInfo<DATATYPE, ITYPE> gradoutputcellI, \
- TensorInfo<DATATYPE, ITYPE> gradinputI, \
- ITYPE hsz, \
- ITYPE totalElements); \
-
-
-#define EXPAND_DIM(ITYPE) \
- EXPAND_FUNCTION(ITYPE, -2) \
- EXPAND_FUNCTION(ITYPE, -1) \
- EXPAND_FUNCTION(ITYPE, 1) \
- EXPAND_FUNCTION(ITYPE, 2) \
-
-
-#define EXPAND_TYPE \
- EXPAND_DIM(unsigned int) \
- EXPAND_DIM(unsigned long) \
-
-
-EXPAND_TYPE
-
-// ************ END generating specializations ************** //
-
-// ************ START Create actual function calls ********** //
+
+// ************ START Create function calls ********** //
#define FILL_FUNCTION(ITYPE, DIM, FUNCTION) FUNCTION(ITYPE, DIM)
#define FILL_DIM(ITYPE, DIM, FUNCTION) \