pytorch/caffe2/python/pybind_workspace.h
Loren Arthur 1dad051b05 Move workspace related functions to separate file (#87651)
Move workspace related functions to separate file

Test Plan: Existing tests

Differential Revision: D40657708

Pull Request resolved: https://github.com/pytorch/pytorch/pull/87651
Approved by: https://github.com/malfet
2022-10-29 04:52:01 +00:00

16 lines
568 B
C++

namespace caffe2 {
namespace python {
Workspace* GetCurrentWorkspace();
void SetCurrentWorkspace(Workspace* workspace);
Workspace* NewWorkspace();
Workspace* GetWorkspaceByName(const std::string& name);
std::string GetCurrentWorkspaceName();
void InsertWorkspace(const std::string& name, std::unique_ptr<Workspace> ws);
void SwitchWorkspaceInternal(const std::string& name, bool create_if_missing);
void ResetWorkspace(Workspace* workspace);
void GetWorkspaceNames(std::vector<std::string>& names);
void ClearWorkspaces();
} // namespace python
} // namespace caffe2