Skip to content

Commit

Permalink
[libtorch] Include <chrono> for high_resolution_clock (#43234)
Browse files Browse the repository at this point in the history
  • Loading branch information
LilyWangLL authored Jan 15, 2025
1 parent 3ebdcf4 commit e1118ae
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
11 changes: 11 additions & 0 deletions ports/libtorch/add-include-chrono.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff --git a/torch/csrc/jit/runtime/logging.h b/torch/csrc/jit/runtime/logging.h
index 5499ecf..269168e 100644
--- a/torch/csrc/jit/runtime/logging.h
+++ b/torch/csrc/jit/runtime/logging.h
@@ -1,5 +1,6 @@
#pragma once

+#include <chrono>
#include <mutex>
#include <string>
#include <unordered_map>
1 change: 1 addition & 0 deletions ports/libtorch/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ vcpkg_from_github(
fix-aten-cutlass.patch
fix-build-error-with-fmt11.patch
no-abs-path.patch
add-include-chrono.patch
)

file(REMOVE_RECURSE "${SOURCE_PATH}/caffe2/core/macros.h") # We must use generated header files
Expand Down
2 changes: 1 addition & 1 deletion ports/libtorch/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libtorch",
"version": "2.1.2",
"port-version": 9,
"port-version": 10,
"description": "Tensors and Dynamic neural networks in Python with strong GPU acceleration",
"homepage": "https://pytorch.org/",
"license": null,
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5230,7 +5230,7 @@
},
"libtorch": {
"baseline": "2.1.2",
"port-version": 9
"port-version": 10
},
"libtorrent": {
"baseline": "2.0.10",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libtorch.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7307f8c37b266aeb61d83e069740e75cff863bf6",
"version": "2.1.2",
"port-version": 10
},
{
"git-tree": "0a4d67bf0f603494ff7ce3e51587513a1df295fe",
"version": "2.1.2",
Expand Down

0 comments on commit e1118ae

Please sign in to comment.