Skip to content

[IO] Return bytes written in Stream::Write - #686

Merged
chyunsu3 merged 1 commit into
dmlc:mainfrom
Lunderberg:io_return_bytes_written_in_stream
May 22, 2024
Merged

[IO] Return bytes written in Stream::Write#686
chyunsu3 merged 1 commit into
dmlc:mainfrom
Lunderberg:io_return_bytes_written_in_stream

Conversation

@Lunderberg

Copy link
Copy Markdown
Contributor

This commit updates the Stream::Write method to return the number of bytes written, analogous to the current behavior of Stream::Read. This information is necessary to correctly model partial writes to a buffered stream. (e.g. Writing to a OS pipe when the pipe's buffer is smaller than the data to be written.)

This commit updates the `Stream::Write` method to return the number of
bytes written, analogous to the current behavior of `Stream::Read`.
This information is necessary to correctly model partial writes to a
buffered stream. (e.g. Writing to a OS pipe when the pipe's buffer is
smaller than the data to be written.)
Lunderberg added a commit to Lunderberg/tvm that referenced this pull request May 14, 2024
This commit updates TVM implementations of `dmlc::Stream`. With
dmlc/dmlc-core#686, this API now requires
the `Write` method to return the number of bytes written. This change
allows partial writes to be correctly handled.
@chyunsu3
chyunsu3 merged commit 3031e4a into dmlc:mainMay 22, 2024
@Lunderberg
Lunderberg deleted the io_return_bytes_written_in_stream branch May 22, 2024 12:59
tqchen pushed a commit to apache/tvm that referenced this pull request May 30, 2024
* [Runtime] Compatibility with dmlc::Stream API changes
This commit updates TVM implementations of `dmlc::Stream`. With
dmlc/dmlc-core#686, this API now requires
the `Write` method to return the number of bytes written. This change
allows partial writes to be correctly handled.
* Update dmlc-core version
* lint fix
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Lunderberg@chyunsu3