-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e07c81
commit 8ec9fbc
Showing
10 changed files
with
987 additions
and
16 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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
From 0000000000000000000000000000000000000000 Mon Dec 21 00:00:00 2000 | ||
Date: Mon, 21 Dec 2000 00:00:00 -0600 | ||
Subject: Disable stream for all WASM builds. | ||
|
||
diff --git a/cmake/adjust_global_compile_flags.cmake b/cmake/adjust_global_compile_flags.cmake | ||
index 690b6d4..aaa458f 100644 | ||
--- a/cmake/adjust_global_compile_flags.cmake | ||
+++ b/cmake/adjust_global_compile_flags.cmake | ||
@@ -102,7 +102,7 @@ if (onnxruntime_MINIMAL_BUILD) | ||
endif() | ||
|
||
# Enable stream for all the non-minimal build | ||
-if (NOT onnxruntime_MINIMAL_BUILD) | ||
+if (NOT onnxruntime_MINIMAL_BUILD AND NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") | ||
add_compile_definitions(ORT_ENABLE_STREAM) | ||
endif() | ||
|
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,26 @@ | ||
From 0000000000000000000000000000000000000000 Mon Dec 21 00:00:00 2000 | ||
Date: Mon, 21 Dec 2000 00:00:00 -0600 | ||
Subject: Override `TimeDiffMicroSeconds` to always return 0. | ||
|
||
diff --git a/include/onnxruntime/core/common/common.h b/include/onnxruntime/core/common/common.h | ||
index 0822eba..7e684d3 100644 | ||
--- a/include/onnxruntime/core/common/common.h | ||
+++ b/include/onnxruntime/core/common/common.h | ||
@@ -249,13 +249,12 @@ void LogRuntimeError(uint32_t session_id, const common::Status& status, const ch | ||
} \ | ||
} while (0) | ||
|
||
-inline long long TimeDiffMicroSeconds(TimePoint start_time) { | ||
- auto end_time = std::chrono::high_resolution_clock::now(); | ||
- return std::chrono::duration_cast<std::chrono::microseconds>(end_time - start_time).count(); | ||
+inline long long TimeDiffMicroSeconds(TimePoint /*start_time*/) { | ||
+ return 0; | ||
} | ||
|
||
-inline long long TimeDiffMicroSeconds(TimePoint start_time, TimePoint end_time) { | ||
- return std::chrono::duration_cast<std::chrono::microseconds>(end_time - start_time).count(); | ||
+inline long long TimeDiffMicroSeconds(TimePoint /*start_time*/, TimePoint /*end_time*/) { | ||
+ return 0; | ||
} | ||
|
||
struct null_type {}; |
Oops, something went wrong.