MCPcopy Create free account
hub / github.com/apache/singa / Setup

Method Setup

src/model/layer/cudnn_convolution.cc:38–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void 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
50void CudnnConvolution::ToDevice(std::shared_ptr<Device> device) {
51 Convolution::ToDevice(device);

Callers

nothing calls this directly

Calls 4

SetupFunction · 0.85
ToLowerCaseFunction · 0.85
workspace_byte_limitMethod · 0.80
preferMethod · 0.80

Tested by

no test coverage detected