blob: a670bc08973986a905a7f1ff42e1c71bbb3925b7 [file] [log] [blame]
/*!
* Copyright (c) 2015 by Contributors
* \file deconvolution.cu
* \brief
* \author Wei Wu
*/
#include "./deconvolution-inl.h"
#if MXNET_USE_CUDNN == 1
#include "./cudnn_deconvolution-inl.h"
#endif // MXNET_USE_CUDNN
namespace mxnet {
namespace op {
template<>
Operator* CreateOp<gpu>(DeconvolutionParam param, int dtype,
std::vector<TShape> *in_shape,
std::vector<TShape> *out_shape,
Context ctx) {
Operator *op = NULL;
#if MXNET_USE_CUDNN == 1
MSHADOW_REAL_TYPE_SWITCH(dtype, DType, {
op = new CuDNNDeconvolutionOp<DType>(param, *in_shape, *out_shape, ctx);
});
#else
MSHADOW_REAL_TYPE_SWITCH(dtype, DType, {
op = new DeconvolutionOp<gpu, DType>(param);
});
#endif // MXNET_USE_CUDNN
return op;
}
} // namespace op
} // namespace mxnet