vcpkg/ports/libtorch/fix-glog.patch
Alexander Neumann 20584b9d44
[libtorch] update to 2.1.2 (#36246)
* [libtorch] update to 2.1.2

* adjust features and deps

* remove dep

* fix onnx case

* use system fxdiv

* update xnnpack

* fxdiv fix in libtorch

* add newline

* xnnpack does not install configs

* more patching

* fix patch

* more fixes

* use full lib for sleef.

* fix glog symbol on osx

* try fixing msvc ice

* ok renaming did nothing

* v db

* remove comments

* v db

* cuda is only for x64

* v db

* fix usage since cuda is still external to vcpkg

* v db

---------

Co-authored-by: Jim wang (BEYONDSOFT CONSULTING INC) <v-wangjim@microsoft.com>
2024-01-30 14:15:33 -08:00

31 lines
1.0 KiB
Diff

diff --git a/c10/util/Logging.cpp b/c10/util/Logging.cpp
index ff8e1d6cc..306dac51f 100644
--- a/c10/util/Logging.cpp
+++ b/c10/util/Logging.cpp
@@ -218,24 +218,11 @@ C10_DEFINE_int(
google::GLOG_WARNING,
"The minimum log level that caffe2 will output.");
-// Google glog's api does not have an external function that allows one to check
-// if glog is initialized or not. It does have an internal function - so we are
-// declaring it here. This is a hack but has been used by a bunch of others too
-// (e.g. Torch).
-namespace google {
-namespace glog_internal_namespace_ {
-bool IsGoogleLoggingInitialized();
-} // namespace glog_internal_namespace_
-} // namespace google
-
namespace c10 {
namespace {
void initGoogleLogging(char const* name) {
-#if !defined(_MSC_VER)
- // This trick can only be used on UNIX platforms
- if (!::google::glog_internal_namespace_::IsGoogleLoggingInitialized())
-#endif
+ if (!::google::IsGoogleLoggingInitialized())
{
::google::InitGoogleLogging(name);
#if !defined(_MSC_VER)