From b8dc162dc4c02d5305a4242230799205677e5a5d Mon Sep 17 00:00:00 2001 From: Anna Karbownik <69239501+akarbown@users.noreply.github.com> Date: Tue, 16 Mar 2021 17:39:27 +0100 Subject: [PATCH] Fix for test_lans failure (#20036) Make NumTensors function unique to multi_lans.cc & multi_lamb.cc. --- src/operator/contrib/multi_lamb.cc | 2 +- src/operator/contrib/multi_lans.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); }