| 36 | } |
| 37 | |
| 38 | void CudnnConvolution::Setup(const Shape& in_sample, const LayerConf &conf) { |
| 39 | Convolution::Setup(in_sample, conf); |
| 40 | ConvolutionConf conv_conf = conf.convolution_conf(); |
| 41 | // convert MB to bytes |
| 42 | workspace_byte_limit_ = conv_conf.workspace_byte_limit() << 20; |
| 43 | prefer_ = ToLowerCase(conv_conf.prefer()); |
| 44 | CHECK(prefer_ == "fastest" || prefer_ == "limited_workspace" || |
| 45 | prefer_ == "no_workspace" || prefer_ == "autotune") |
| 46 | << "CudnnConvolution only supports four algorithm preferences: fastest, " |
| 47 | "limited_workspace, no_workspace and autotune"; |
| 48 | } |
| 49 | |
| 50 | void CudnnConvolution::ToDevice(std::shared_ptr<Device> device) { |
| 51 | Convolution::ToDevice(device); |
nothing calls this directly
no test coverage detected