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

Migrating from DTypePointer to UnsafePointer #92

Closed
mmenendezg opened this issue Aug 20, 2024 · 5 comments
Closed

Migrating from DTypePointer to UnsafePointer #92

mmenendezg opened this issue Aug 20, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@mmenendezg
Copy link

The Mojo team has confirmed in the nightly changelog that they will deprecate the DTypePointer, and they suggest migrating to UnsafePointer.

They have also changed the methods of the UnsafePointer.

This will require to change the way we initialize the pointers for the data of the NDArrays.

I can help on the migration using Max Nightly for the NDArray struct.

@MadAlex1997
Copy link
Collaborator

@mmenendezg Has it been confirmed that it will make it to the main branch in the next Mojo update? They have changed direction regarding this several times.

@mmenendezg
Copy link
Author

I've only seen the changelog on the nightly branch, but I guess we should wait until the changes are applied to the main branch.

@mmenendezg
Copy link
Author

@MadAlex1997 It seems like DTypePointer has been completely deprecated on the nightly version:

image

@MadAlex1997
Copy link
Collaborator

MadAlex1997 commented Aug 24, 2024

@mmenendezg They have reverted things of that scale in the main updates before. Regardless we need them to decide what the API for SIMD data loading is, as there is still a debate between SIMD[width=n].load(UnsafePointer,i) and UnsafePointer.load[width=n](i).

We can do it correctly once instead of chasing 5 or 10 changes, each of which might take 30 minutes to multiple hours. This is why, in addition to version stability and access (ie magic being functional and easy to add packages to), until Mojo is much more stable we don't plan on making a build based on Mojo features between main releases.

We have discussed this on the Numojo Discord you are welcome to join the conversation.

@forFudan forFudan added the enhancement New feature or request label Sep 4, 2024
@shivasankarka
Copy link
Collaborator

The PR #108 migrates NuMojo from Mojo 24.4 to 24.5 and uses UnsafePointer now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants