Skip to content

Commit c4a9ea5

Browse files
qjia7Copilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
1 parent 01b8334 commit c4a9ea5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/models/onnxruntime_api.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,11 @@ struct OrtSyncStream {
865865
/// \brief Create a sync stream for a specific execution provider device
866866
/// \param ep_device The execution provider device (from OrtEnv::GetEpDevices)
867867
/// \param stream_options Optional stream configuration options
868-
static std::unique_ptr<OrtSyncStream> Create(const OrtEpDevice* ep_device, const OrtKeyValuePairs* stream_options = nullptr);
868+
static std::unique_ptr<OrtSyncStream> Create(const OrtEpDevice* ep_device, const OrtKeyValuePairs* stream_options = nullptr) {
869+
OrtSyncStream* p_stream = nullptr;
870+
Ort::ThrowOnError(Ort::api->CreateSyncStream(ep_device, stream_options, &p_stream));
871+
return std::unique_ptr<OrtSyncStream>(p_stream);
872+
}
869873

870874
/// \brief Get the native stream handle (e.g., cudaStream_t for CUDA)
871875
void* GetHandle() const {

0 commit comments

Comments
 (0)