Modular

M

Modular

This server is the home of the MAX and Mojo community. Join us to chat about all things Modular!

Join

questions

community-showcase

Shared Object Support?

I doubt this is the case, but is there by chance a way to compile mojo to linux shared objects? If not is there any plan to include the ability in the future? Even if they cant cross operate with other executables coded in languages other than mojo, they'd be super useful for a project I have in mind.

Simd size greater than max supported by processor

What happens if I create a SIMD value with a large size - something like 2^10 or larger ? Will there be multiple instruction with the max size permitted by the processor ? Wondering what is the best practice when working with large arrays but still want SIMD behaviour ....

Installing Mojo on WSL?

I've got WSL downloaded and I have been trying to install Mojo, but all the tutorials that I find seem to be outdated, and running mojo commands isn't possible after installing Magic. Can someone tell me how to install Mojo with WSL?

vectorize functional VS SIMD regular ops

Hi, Let say we want to implent simple 2 vector multiplications. the first implentation is using SIMD as data, we define 2 vectors using SIMD and do mul between them. the second is using DTypePointer and then using vectorize functional. What is the diffirence ? is it the same ? ...

Just learn Mojo?

Preface: I’m new to AI/ML it’s always been on my todo list. Python never really appealed to me it’s a 💩 languages putting it nicely. Mojo shows great promise but I’m curious if it’s a good idea to just learn mojo? More importantly re-implement things like Jax, Flax in pure mojo? Rust seems to be growing in this space as well I like polars and burn 🔥 a rust version of PyTorch. However I think mojo clearly has the edge. My end goal is to completely write my data layer in mojo with a surraldb backend. The great thing about mojo is its ability to use python packages so you can actually use the surreal python sdk today with all its great built in ML features. ...

What's the thing with global variables?

From what I've tried, using the global variables like this ``` var some_global_var: String = "Hey!" fn main():...

always_inline and struct problem

I'm trying to create a transpiler and I've created an architecutre in which every parsed token of the AST is repersented as ShaderOperation ```js struct ShaderOperation(PPrintable, CollectionElement): var tokens: List[Token] var name: String...

How to random int ??

I have very simple: results = DTypePointer[type].alloc(batch * cols) how to generate random idex (int) in [0,batch * cols] ??? all the random function in mojo returns SIMD, ...

Can Mojo support hot reload in debugging session?

Just curiosity. Is this possible to replace code on the fly?

Specialization

I was considering figuring out a nice Boxed type for stdlib, but fleshing it out for decent ergonomics (things like Boxed<T: Clone>: Clone) would need specialization, or something to mimic it. Is that on the near-term roadmap? I'm sure I could work around it with some type-parameter nonsense, but if I can avoid that it would be preferable

shift right/left in max graphs custom ops

first of all I want to say it's haarddd to learn mojo/max !! I am struggling !! hope it will be worth it... I have the following new custom simple op in max graph. for now it's dummy and just do or between two input booleans. ...

Affiliate program.

Does Modular offer an affiliate program?

Why not separate Parameters and Generics?

The mojo docs have the following example: ``` fn repeat[MsgType: Stringable, //, count: Int](msg: MsgType): @parameter...

Dynamic Shapes to MAX GRAPH API

Giving dynamic shape to the graph is giving me error. My code: ``` fn main() raises: var x = Tensor[DType.float32] (1,2,5) var y = Tensor[DType.float32] (1,2,5)...

Usage of mojo test

Is anyone using mojo test to run their unit tests? I’m trying to use it instead defining a test package that’s executed via mojo run. However, it doesn’t work as described in the docs. If my test directory is not a mojo package, I can’t import my package source code to test it. And -I doesn’t resolve the issue either. I figure I’m just missing something here and was hoping someone else could share their repo as an example....

mojo-lsp-server crashing

Is it crashing for anybody else? I'm using it with neovim and I can reliably make it crash after a couple of minutes of using it.

?Missing? API Docs for MAX/gRPC/Kserve?

First of all. Stunning work (MAX/Mojo). Thank you for sharing with the world 🙂 We're looking to integrate/run tests with (for stream processing to multi-model-realtime/inference) https://docs.modular.com/max/serve/ ...

Energy usage benchmarks?

I've read a lot about Mojo performance benchmarks but not that much about energy consumption? Are there any good articles where one could derive roughly the savings on Energy?...

Offline Kaggle Install

I would like to install and use Mojo+Max (Magic-cli?) in an offline Kaggle Notebook but the workarounds that I have seen require uploading the package's .whl files (https://www.kaggle.com/code/jisukim8873/install-llm-packages-without-internet-access/notebook, https://www.kaggle.com/code/panozzaj/installing-pip-packages-on-kaggle-without-internet) as a dataset. I can mark the dataset with Modular's License but I believe that is against their terms and conditions of not hosting Mojo's codebase. Co...

Grok-2 with Mojo.

Is it possible to create a version of Grok-2 with Mojo programming language? If yes, how? If not, may I know why? Thank you....