Skip to content

Commit

Permalink
[Bugfix] Fix OrtCompatiableGetInputName errors (#435)
Browse files Browse the repository at this point in the history
* Update utils.cmake

* Update vae.h

* Update test_lite_sd_pipeline.cpp

* Update ort_config.h
  • Loading branch information
DefTruth authored Sep 4, 2024
1 parent e3f653e commit 8f66017
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lite/ort/core/ort_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ inline static std::string OrtCompatiableGetInputName(size_t index, OrtAllocator*
#if ORT_API_VERSION >= 14
return std::string(ort_session->GetInputNameAllocated(index, allocator).get());
#else
return std::string(ort_session->GetInputName(i, allocator));
return std::string(ort_session->GetInputName(index, allocator));
#endif
}

Expand All @@ -26,7 +26,7 @@ inline static std::string OrtCompatiableGetOutputName(size_t index, OrtAllocator
#if ORT_API_VERSION >= 14
return std::string(ort_session->GetOutputNameAllocated(index, allocator).get());
#else
return std::string(ort_session->GetOutputName(i, allocator));
return std::string(ort_session->GetOutputName(index, allocator));
#endif
}

Expand Down

0 comments on commit 8f66017

Please sign in to comment.