From 3135a5115ab778a4fedc43e262153ec1028ad5c6 Mon Sep 17 00:00:00 2001 From: ChengjieLi Date: Wed, 28 Jun 2023 13:15:27 +0800 Subject: [PATCH] remove torch --- cpp/collective/rendezvous/include/store.hpp | 5 ----- cpp/collective/rendezvous/src/tcp_store.cpp | 13 ++----------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/cpp/collective/rendezvous/include/store.hpp b/cpp/collective/rendezvous/include/store.hpp index be4e943b..57f430c2 100644 --- a/cpp/collective/rendezvous/include/store.hpp +++ b/cpp/collective/rendezvous/include/store.hpp @@ -56,7 +56,6 @@ class Store { compareSet(const std::string &key, const std::vector ¤tValue, const std::vector &newValue) { - // TORCH_INTERNAL_ASSERT(false, "Not implemented."); throw std::runtime_error("Not implemented."); } @@ -91,10 +90,6 @@ class Store { // DELETE: callback(currentValue, c10::nullopt) // null newValue virtual void watchKey(const std::string & /* unused */, WatchKeyCallback /* unused */) { - // TORCH_CHECK( - // false, - // "watchKey only implemented for TCPStore and PrefixStore that - // wraps TCPStore."); throw std::runtime_error("watchKey only implemented for TCPStore and " "PrefixStore that wraps TCPStore."); } diff --git a/cpp/collective/rendezvous/src/tcp_store.cpp b/cpp/collective/rendezvous/src/tcp_store.cpp index d32ff13c..0fcb0c9a 100644 --- a/cpp/collective/rendezvous/src/tcp_store.cpp +++ b/cpp/collective/rendezvous/src/tcp_store.cpp @@ -24,6 +24,7 @@ limitations under the License. */ #include #include +// TODO: Currently not support windows #ifdef _WIN32 # include # include @@ -33,7 +34,7 @@ limitations under the License. */ #endif #ifdef _WIN32 -# include +// # include #else # include "unix_sock_utils.hpp" #endif @@ -120,10 +121,6 @@ void BackgroundThread::stop() { SetEvent(ghStopEvent_); } #else void BackgroundThread::initStopSignal() { if (pipe(controlPipeFd_.data()) == -1) { - // TORCH_CHECK( - // false, - // "Failed to create the control pipe to start the " - // "BackgroundThread run"); throw std::runtime_error("Failed to create the control pipe to start " "the BackgroundThread run"); } @@ -323,7 +320,6 @@ void TCPStoreMasterDaemon::query(int socket) { } else if (qt == QueryType::MULTI_SET) { multiSetHandler(socket); } else { - // TORCH_CHECK(false, "Unexpected query type"); throw std::runtime_error("Unexpected query type"); } } @@ -1226,7 +1222,6 @@ bool TCPStore::check(const std::vector &keys) { if (response == detail::CheckResponseType::NOT_READY) { return false; } - // TORCH_CHECK(false, "ready or not_ready response expected"); throw std::runtime_error("ready or not_ready response expected"); } @@ -1260,7 +1255,6 @@ void TCPStore::doWait(std::vector keys, auto response = client_->receiveValue(); if (response != detail::WaitResponseType::STOP_WAITING) { - // TORCH_CHECK(false, "Stop_waiting response is expected"); throw std::runtime_error("Stop_waiting response is expected"); } } @@ -1301,9 +1295,6 @@ TCPStore::multiGet(const std::vector &keys) { void TCPStore::multiSet(const std::vector &keys, const std::vector> &values) { - // TORCH_CHECK( - // keys.size() == values.size(), - // "multiSet keys and values vectors must be of same size"); assert(keys.size() == values.size()); const std::lock_guard lock(activeOpLock_);