I am done

This commit is contained in:
2024-10-30 22:14:35 +01:00
parent 720dc28c09
commit 40e2a747cf
36901 changed files with 5011519 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#pragma once
#include <c10/core/SafePyObject.h>
#include <c10/macros/Macros.h>
#include <unordered_map>
namespace at::impl {
struct TORCH_API ThreadLocalPythonObjects {
static void set(const std::string& key, std::shared_ptr<SafePyObject> value);
static const std::shared_ptr<SafePyObject>& get(const std::string& key);
static bool contains(const std::string& key);
static const ThreadLocalPythonObjects& get_state();
static void set_state(ThreadLocalPythonObjects state);
private:
std::unordered_map<std::string, std::shared_ptr<c10::SafePyObject>> obj_dict_;
};
} // namespace at::impl