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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finalize Update to Mojo 24.2.1 #90

Closed
wants to merge 3 commits into from
Closed

Conversation

sibarras
Copy link

No description provided.

llama2.mojo Outdated
# correct Tensor type and shape for easy reading, without copying data
var int32_ptr = DTypePointer[DType.int8](config_data_raw.steal_data().value).bitcast[DType.int32]()
var int32_ptr = config_data_raw._steal_ptr().bitcast[DType.int32]()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not return back the __steal_ptr() , since it may be removed from the future releases. Do you see any benefits of __steal_ptr() ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, I just used it because was easier to read.

# throw away config data
_ = f.read_bytes(NUM_CONFIG_INT * sizeof[DType.int32]())
bytes_read += NUM_CONFIG_INT * sizeof[DType.int32]()
with open(file_name, "rb") as f:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't move the whole init logic under with context block. It increases cyclomatic complexity and makes harder the maintenance of this part.

@tairov
Copy link
Owner

tairov commented May 21, 2024

Moved supported version to 24.3, thank you!

@tairov tairov closed this May 21, 2024
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