Skip to content

Guidelines for writing scalable and portable Mojo code #164

Closed Locked Answered by Mogball
prabhuramachandran asked this question in Q&A
Discussion options

You must be logged in to vote

Eventually, would Mojo allow for automatic optimization and parallelization of heavily numerical code via say polyhedral optimization? Would this be automatic or would this require writing the code in a specific way? The current matrix multiplication example provided in the documentation does require writing the code in a specific way, would this change so users could write it naively and expect similar performance as a specially hand-optimized version? Or is the approach used in the documentation the best way to do so for the forseeable future?

Mojo's compiler is not going to be magic. If you write matmul as a triply nested for loop, you will get a triply nested for loop on all hardwar…

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@prabhuramachandran
Comment options

@Mogball
Comment options

@prabhuramachandran
Comment options

Answer selected by iamtimdavis
Comment options

You must be logged in to vote
1 reply
@prabhuramachandran
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants