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

[stdlib] Change FileHandle.read_bytes() to not copy data #2319

Merged
merged 1 commit into from Apr 17, 2024

Conversation

MoSafi2
Copy link
Contributor

@MoSafi2 MoSafi2 commented Apr 17, 2024

Fixes #2051, allows FileHandle.read_bytes() to return List[Int8] without additional copies, depends on #2182.

Signed-off-by: Mohamed Mabrouk <mohamed.mabrouk@rwth-aachen.de>
@MoSafi2 MoSafi2 requested a review from a team as a code owner April 17, 2024 20:05
@JoeLoser JoeLoser changed the title [stdlib] fix FileHandle.read_bytes() [stdlib] Change FileHandle.read_bytes() to not copy data Apr 17, 2024
@JoeLoser JoeLoser merged commit 0b344fb into modularml:nightly Apr 17, 2024
7 checks passed
@MoSafi2 MoSafi2 deleted the fix_read_bytes branch April 18, 2024 08:48
patrickdoc added a commit to patrickdoc/mojo that referenced this pull request Apr 24, 2024
…odularml#2319) (#38182)

Augment `FileHandle.read_bytes()` to not copy the data read when
constructing the returned `List[Int8]` by leveraging the new constructor
added in [Internal Link]

Fixes modularml#2051

Signed-off-by: Mohamed Mabrouk <mohamed.mabrouk@rwth-aachen.de>

mojo-orig-commit: 0b344fb

---------

Co-authored-by: MoSafi2 [Internal Link]
Co-authored-by: abdul dakkak <adakkak@modular.com>

modular-orig-commit: fcb2f1457eb6f2eb5a1c371fbdf24fca74c308ce
jayzhan211 pushed a commit to jayzhan211/mojo that referenced this pull request Apr 27, 2024
…odularml#2319) (#38182)

Augment `FileHandle.read_bytes()` to not copy the data read when
constructing the returned `List[Int8]` by leveraging the new constructor
added in [Internal Link]

Fixes modularml#2051

Signed-off-by: Mohamed Mabrouk <mohamed.mabrouk@rwth-aachen.de>

mojo-orig-commit: 0b344fb

---------

Co-authored-by: MoSafi2 [Internal Link]
Co-authored-by: abdul dakkak <adakkak@modular.com>

modular-orig-commit: fcb2f1457eb6f2eb5a1c371fbdf24fca74c308ce
patrickdoc added a commit to patrickdoc/mojo that referenced this pull request May 2, 2024
…odularml#2319) (#38182)

Augment `FileHandle.read_bytes()` to not copy the data read when
constructing the returned `List[Int8]` by leveraging the new constructor
added in modularml#2182.

Fixes modularml#2051

Signed-off-by: Mohamed Mabrouk <mohamed.mabrouk@rwth-aachen.de>

mojo-orig-commit: 0b344fb

---------

Co-authored-by: MoSafi2 <127411725+MoSafi2@users.noreply.github.com>
Co-authored-by: abdul dakkak <adakkak@modular.com>
MODULAR_ORIG_COMMIT_REV_ID: fcb2f1457eb6f2eb5a1c371fbdf24fca74c308ce
patrickdoc added a commit that referenced this pull request May 2, 2024
…2319) (#38182)

Augment `FileHandle.read_bytes()` to not copy the data read when
constructing the returned `List[Int8]` by leveraging the new constructor
added in #2182.

Fixes #2051

Signed-off-by: Mohamed Mabrouk <mohamed.mabrouk@rwth-aachen.de>

mojo-orig-commit: 0b344fb

---------

Co-authored-by: MoSafi2 <127411725+MoSafi2@users.noreply.github.com>
Co-authored-by: abdul dakkak <adakkak@modular.com>
MODULAR_ORIG_COMMIT_REV_ID: fcb2f1457eb6f2eb5a1c371fbdf24fca74c308ce
softmaxer pushed a commit to softmaxer/mojo that referenced this pull request May 3, 2024
…odularml#2319) (#38182)

Augment `FileHandle.read_bytes()` to not copy the data read when
constructing the returned `List[Int8]` by leveraging the new constructor
added in modularml#2182.

Fixes modularml#2051

Signed-off-by: Mohamed Mabrouk <mohamed.mabrouk@rwth-aachen.de>

mojo-orig-commit: 0b344fb

---------

Co-authored-by: MoSafi2 <127411725+MoSafi2@users.noreply.github.com>
Co-authored-by: abdul dakkak <adakkak@modular.com>
MODULAR_ORIG_COMMIT_REV_ID: fcb2f1457eb6f2eb5a1c371fbdf24fca74c308ce

Signed-off-by: Sriram Vadlamani <sriram.vadlamani@proton.me>
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