Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 22, 2024

Conversation

Lunderberg
Copy link
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.
@hcho3 hcho3 merged commit 3031e4a into dmlc:main May 22, 2024
1 check passed
@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 free to 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.

None yet

2 participants