forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trim libshm deps, move tempfile.h to c10 (pytorch#17019)
Summary: libshm_manager doesn't need to depend on all of libtorch. It only uses tiny tempfile.h which can be moved to c10. I could just duplicate the file too, but it's not worth it as c10 is small enough. Pull Request resolved: pytorch#17019 Differential Revision: D14052688 Pulled By: dzhulgakov fbshipit-source-id: 8797d15f8c7c49c49d40b7ab2f43aa3bf6becb0c
- Loading branch information
1 parent
d25fee3
commit 46503a7
Showing
6 changed files
with
21 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <c10/util/tempfile.h> | ||
#include <gtest/gtest.h> | ||
|
||
#if !defined(_WIN32) | ||
TEST(TempFileTest, MatchesExpectedPattern) { | ||
c10::TempFile pattern = c10::make_tempfile("test-pattern-"); | ||
ASSERT_NE(pattern.name.find("test-pattern-"), std::string::npos); | ||
} | ||
#endif // !defined(_WIN32) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
#pragma once | ||
|
||
#include <torch/csrc/utils/tempfile.h> | ||
|
||
#include <c10/util/Exception.h> | ||
|
||
#include <gtest/gtest.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters