You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2025/05/05 15:25:37 UTC
(tvm) branch refactor-s3 updated (b5d5d6c398 -> 17c7735392)
This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a change to branch refactor-s3
in repository https://gitbox.apache.org/repos/asf/tvm.git
discard b5d5d6c398 [WIN] Remove lock to avoid mutex dep at init time
new 17c7735392 [WIN] Remove lock to avoid mutex dep at init time
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (b5d5d6c398)
\
N -- N -- N refs/heads/refactor-s3 (17c7735392)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
ffi/src/ffi/traceback_win.cc | 2 ++
src/node/attr_registry.h | 4 +---
2 files changed, 3 insertions(+), 3 deletions(-)
(tvm) 01/01: [WIN] Remove lock to avoid mutex dep at init time
Posted by tq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch refactor-s3
in repository https://gitbox.apache.org/repos/asf/tvm.git
commit 17c77353922db36e33e0e57e518f21807aee2a9f
Author: tqchen <ti...@gmail.com>
AuthorDate: Mon May 5 09:35:15 2025 -0400
[WIN] Remove lock to avoid mutex dep at init time
---
ffi/src/ffi/traceback_win.cc | 2 ++
src/node/attr_registry.h | 11 +----------
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/ffi/src/ffi/traceback_win.cc b/ffi/src/ffi/traceback_win.cc
index 4c89c4f239..d49f9e00af 100644
--- a/ffi/src/ffi/traceback_win.cc
+++ b/ffi/src/ffi/traceback_win.cc
@@ -23,8 +23,10 @@
*/
#ifdef _MSC_VER
+// clang-format off
#include <windows.h>
#include <dbghelp.h> // NOLINT(*)
+// clang-format on
#include <tvm/ffi/c_api.h>
#include <tvm/ffi/error.h>
diff --git a/src/node/attr_registry.h b/src/node/attr_registry.h
index 2b022d3e45..e150549bb9 100644
--- a/src/node/attr_registry.h
+++ b/src/node/attr_registry.h
@@ -28,7 +28,6 @@
#include <tvm/runtime/packed_func.h>
#include <memory>
-#include <mutex>
#include <unordered_map>
#include <utility>
#include <vector>
@@ -95,7 +94,6 @@ class AttrRegistry {
*/
void UpdateAttr(const String& attr_name, const KeyType& key, Any value, int plevel) {
using runtime::TVMRetValue;
- std::lock_guard<std::mutex> lock(mutex_);
auto& op_map = attrs_[attr_name];
if (op_map == nullptr) {
op_map.reset(new AttrRegistryMapContainerMap<KeyType>());
@@ -122,7 +120,6 @@ class AttrRegistry {
* \param key The key to the attribute table.
*/
void ResetAttr(const String& attr_name, const KeyType& key) {
- std::lock_guard<std::mutex> lock(mutex_);
auto& op_map = attrs_[attr_name];
if (op_map == nullptr) {
return;
@@ -139,7 +136,6 @@ class AttrRegistry {
* \return The result attribute map.
*/
const AttrRegistryMapContainerMap<KeyType>& GetAttrMap(const String& attr_name) {
- std::lock_guard<std::mutex> lock(mutex_);
auto it = attrs_.find(attr_name);
if (it == attrs_.end()) {
LOG(FATAL) << "Attribute \'" << attr_name << "\' is not registered";
@@ -152,10 +148,7 @@ class AttrRegistry {
* \param attr_name The name of the attribute.
* \return The check result.
*/
- bool HasAttrMap(const String& attr_name) {
- std::lock_guard<std::mutex> lock(mutex_);
- return attrs_.count(attr_name);
- }
+ bool HasAttrMap(const String& attr_name) { return attrs_.count(attr_name); }
/*!
* \return a global singleton of the registry.
@@ -166,8 +159,6 @@ class AttrRegistry {
}
private:
- // mutex to avoid registration from multiple threads.
- std::mutex mutex_;
// entries in the registry
std::vector<std::unique_ptr<EntryType>> entries_;
// map from name to entries.