MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / to_cudnn_format

Function to_cudnn_format

dnn/src/cuda/cudnn_wrapper.cpp:52–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52cudnnTensorFormat_t to_cudnn_format(const param::Convolution::Format format) {
53 switch (format) {
54 case param::Convolution::Format::NCHW:
55 return CUDNN_TENSOR_NCHW;
56#if CUDNN_MAJOR >= 7
57 case param::Convolution::Format::NCHW4:
58 case param::Convolution::Format::NCHW32:
59 return CUDNN_TENSOR_NCHW_VECT_C;
60#endif
61 case param::Convolution::Format::NHWC:
62 return CUDNN_TENSOR_NHWC;
63 default:
64 megdnn_assert_internal(0);
65 }
66}
67} // namespace cuda
68
69} // namespace megdnn

Callers 1

setMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected