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

Method algo_name

dnn/src/common/conv_bias.cpp:188–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186
187template <typename T>
188std::string ConvBias::algo_name(
189 const std::string& base, const T& p, param::ConvBias::Format format) {
190 if (format == param::ConvBias::Format::NCHW) {
191 return ssprintf(
192 "%s:%s:%s", NCHWParamTrait<T>::category.c_str(), base.c_str(),
193 p.to_string().c_str());
194 } else if (format == param::ConvBias::Format::NCHW44) {
195 return ssprintf(
196 "%s:%s:%s", NCHW44ParamTrait<T>::category.c_str(), base.c_str(),
197 p.to_string().c_str());
198 } else if (format == param::ConvBias::Format::NCHW88) {
199 return ssprintf(
200 "%s:%s:%s", NCHW88ParamTrait<T>::category.c_str(), base.c_str(),
201 p.to_string().c_str());
202 }
203 megdnn_throw("Invalid format");
204 return "";
205}
206
207#define FOREACH_CONV_BIAS_PARAM(cb) \
208 cb(WinogradParam) cb(DirectParam) cb(MatmulParam) cb(DefaultParam)

Callers

nothing calls this directly

Calls 1

to_stringMethod · 0.45

Tested by

no test coverage detected