diff --git a/src/operator/contrib/multi_lamb.cc b/src/operator/contrib/multi_lamb.cc index 6ddc4dfd6559..710908d9c23e 100644 --- a/src/operator/contrib/multi_lamb.cc +++ b/src/operator/contrib/multi_lamb.cc @@ -167,7 +167,7 @@ std::vector LAMBParamToVector(uint32_t num_tensors, return ret; } -inline uint32_t NumTensors(const nnvm::NodeAttrs& attrs) { +static inline uint32_t NumTensors(const nnvm::NodeAttrs& attrs) { return static_cast(dmlc::get(attrs.parsed).num_tensors); } diff --git a/src/operator/contrib/multi_lans.cc b/src/operator/contrib/multi_lans.cc index 37d6001312c4..8cb90806af03 100644 --- a/src/operator/contrib/multi_lans.cc +++ b/src/operator/contrib/multi_lans.cc @@ -183,7 +183,7 @@ std::vector LANSParamToVector(uint32_t num_tensors, return ret; } -inline uint32_t NumTensors(const nnvm::NodeAttrs& attrs) { +static inline uint32_t NumTensors(const nnvm::NodeAttrs& attrs) { return static_cast(dmlc::get(attrs.parsed).num_tensors); }