eric-haibin-lin commented on a change in pull request #15124: [MXNET-1294] 
Priority-based parameter propagation for improved data parallel training 
throughput
URL: https://github.com/apache/incubator-mxnet/pull/15124#discussion_r368809867
 
 

 ##########
 File path: src/kvstore/p3store.h
 ##########
 @@ -0,0 +1,271 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Copyright (c) 2015 by Contributors
+ * @file   p3store.h
+ * @brief  priority-based kvstore implementation
+ */
+#ifndef MXNET_KVSTORE_P3STORE_H_
+#define MXNET_KVSTORE_P3STORE_H_
+#include <string>
+#include <vector>
+#include <algorithm>
+#include <utility>
+#include "./kvstore_dist.h"
+#include "mxnet/engine.h"
+#include "ps/ps.h"
+namespace mxnet {
+namespace kvstore {
+
+/**
+ * \brief distributed p3store
+ */
+class P3Store : public KVStoreDist {
+ public:
+  explicit P3Store(bool use_device_comm)
+      : KVStoreDist(use_device_comm) {
+    slice_threshold_ = dmlc::GetEnv("MXNET_KVSTORE_SLICE_THRESHOLD", 40 * 
1000);
+  }
+
+  void Init(const std::vector<int>& keys,
+            const std::vector<NDArray>& values) final {
+    LOG(FATAL) << "Init not supported in P3Store. Call Broadcast instead.";
+  }
+
+  void Init(const std::vector<std::string>& str_keys,
+            const std::vector<NDArray>& values) final {
+    LOG(FATAL) << "Init not supported in P3Store. Call Broadcast instead.";
+  }
+
+  void PullRowSparse(const std::vector<int>& str_keys,
+                     const std::vector<std::pair<NDArray*, NDArray>>& 
val_rowids,
+                     int priority) final {
+    LOG(FATAL) << "PullRowSparse not supported in P3Store. Call Pull instead.";
+  }
+
+  void PullRowSparse(const std::vector<std::string>& str_keys,
+                     const std::vector<std::pair<NDArray*, NDArray>>& 
val_rowids,
+                     int priority) final {
+    LOG(FATAL) << "PullRowSparse not supported in P3Store. Call Pull instead.";
+  }
+
+  void set_updater(const Updater& updater) final {
+      LOG(FATAL) << "Update on P3Store is not supported. Please set 
MXNET_UPDATE_ON_KVSTORE to false.";
 
 Review comment:
   Add prefix with `NotImplementedError:` . Similar for SetGradientCompression, 
PushCompressed, PushRowSparse, PullRowSparse_ 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Reply via email to