lebeg commented on a change in pull request #12308: [MKLDNN] Enable convolution
fusion.
URL: https://github.com/apache/incubator-mxnet/pull/12308#discussion_r212633924
##########
File path: src/operator/nn/mkldnn/mkldnn_convolution-inl.h
##########
@@ -35,19 +35,48 @@
namespace mxnet {
namespace op {
+struct ConvFusionParam : public dmlc::Parameter<ConvFusionParam> {
+ // When adding more members into this clss, please double check GetHash()
+ // won't overflow.
+ bool with_bn;
+ bool with_relu;
+ bool with_sum;
+ bool with_postsum_relu;
+ DMLC_DECLARE_PARAMETER(ConvFusionParam) {
+ DMLC_DECLARE_FIELD(with_bn).set_default(false)
+ .describe("Add post batchnorm.");
+ DMLC_DECLARE_FIELD(with_relu).set_default(false)
+ .describe("Add post relu");
+ DMLC_DECLARE_FIELD(with_sum).set_default(false)
+ .describe("Add post sum");
+ DMLC_DECLARE_FIELD(with_postsum_relu).set_default(false)
+ .describe("Add post relu after sum");
+ }
+ const int GetHash() const {
Review comment:
Can [std::string](https://en.cppreference.com/w/cpp/utility/hash) be used
here instead?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services