Skip to content

Commit

Permalink
[onnxruntime] source patch for DISABLE_ABSEIL
Browse files Browse the repository at this point in the history
  • Loading branch information
luncliff committed Jun 27, 2024
1 parent d4f62c5 commit f4d25ae
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions .circleci/port-linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ grpc[codegen]
flatbuffers
abseil
liblzma
onnxruntime
26 changes: 26 additions & 0 deletions ports/onnxruntime/fix-sources.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/onnxruntime/core/framework/kernel_type_str_resolver.cc b/onnxruntime/core/framework/kernel_type_str_resolver.cc
index d05e02e..6f8a47c 100644
--- a/onnxruntime/core/framework/kernel_type_str_resolver.cc
+++ b/onnxruntime/core/framework/kernel_type_str_resolver.cc
@@ -50,7 +50,7 @@ Status KernelTypeStrResolver::ResolveKernelTypeStr(const Node& node, std::string
// TODO(edgchen1) maybe we can use transparent hash/eq to enable lookup with string_view
const auto type_str_it = type_str_map.find(std::string(kernel_type_str));
#else
- const auto type_str_it = type_str_map.find(kernel_type_str);
+ const auto type_str_it = type_str_map.find(std::string(kernel_type_str)); // abseil::raw_hash_set fails deduction ...
#endif

ORT_RETURN_IF(type_str_it == type_str_map.end(),
diff --git a/onnxruntime/core/framework/ort_value_name_idx_map.h b/onnxruntime/core/framework/ort_value_name_idx_map.h
index 1b5f6bc..b721205 100644
--- a/onnxruntime/core/framework/ort_value_name_idx_map.h
+++ b/onnxruntime/core/framework/ort_value_name_idx_map.h
@@ -36,7 +36,7 @@ class OrtValueNameIdxMap {
#ifdef DISABLE_ABSEIL
auto it = map_.find(std::string(name));
#else
- auto it = map_.find(name);
+ auto it = map_.find(std::string(name)); // abseil::raw_hash_set fails deduction ...
#endif
if (it == map_.end()) {
return ORT_MAKE_STATUS(ONNXRUNTIME, FAIL, "Could not find OrtValue with name '", name, "'");
1 change: 1 addition & 0 deletions ports/onnxruntime/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ vcpkg_from_github(
SHA512 2e1d724eda5635fc24f93966412c197c82ee933aaea4f4ce907b5f2ee7730c1e741f2ef4d50a2d54284fc7bd05bf104bd3c56fd4466525fcd70e63c07fbb2b16
PATCHES
fix-cmake.patch
fix-sources.patch
# fix-clang-cl-simd-compile.patch
fix-llvm-rc-unicode.patch
)
Expand Down

0 comments on commit f4d25ae

Please sign in to comment.