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_r368809279
 
 

 ##########
 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.";
 
 Review comment:
   Could you register "NotImplementedError" at  
https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/error.py#L58 
and change the error message to: 
   `LOG(FATAL) << "NotImplementedError: Init is not supported in P3Store. 
Please call broadcast instead.";`

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to