We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e34f9c commit 8dcebaaCopy full SHA for 8dcebaa
torch/csrc/inductor/aoti_package/model_package_loader.cpp
@@ -47,7 +47,16 @@ bool file_exists(const std::string& path) {
47
48
std::string create_temp_dir() {
49
#ifdef _WIN32
50
- throw std::runtime_error("Not implemented");
+ try {
51
+ fs::path temp_dir = fs::temp_directory_path();
52
+ return temp_dir.string();
53
+ } catch (const fs::filesystem_error& e) {
54
+ throw std::runtime_error(
55
+ "Failed to get temporary directory: " + std::string(e.what()));
56
+ } catch (...) {
57
58
+ "Unknown error occurred while getting temporary directory");
59
+ }
60
#else
61
std::string temp_dir = "/tmp/XXXXXX";
62
if (mkdtemp(temp_dir.data()) == nullptr) {
0 commit comments