Dasor
MModular
•Created by Dasor on 12/6/2024 in #questions
Confused with conv2d op
Hi everyone,
I'm trying to test out the conv2d mojo op in the graph API: https://docs.modular.com/max/api/mojo/graph/ops/convolution/conv2d/ but I'm pretty confused and there are some things I've been trying to figure out for a while now.
First of all I don't know what is the RSCF layout and I can't seem to find any information online. This leads me to not really understand how to know which shape the output tensor will have given the shape of and input and a filter. I'm currently running this code ( I will append it in a comment because the message is to large)
The code works, but if I change the alias on top for other numbers that in my mind make sense I start getting errors. I've also been looking for example everywhere but I haven't been able to find any.
I don't know if I'm making some rookie mistake or If I'm missing some knowledge about convolution so any help is extremely appreciated!. .
3 replies
MModular
•Created by Dasor on 12/1/2024 in #questions
MNIST slower on MAX than on Pytorch
Hi everyone, I'm getting started with all this promising stuff you guys are developing so I took a look at the tutorial to get started with MAX Graph: https://docs.modular.com/max/tutorials/get-started-with-max-graph/
I have been playing with the code it provides and I measured the time the python MNIST implementation takes to do inference which in my CPU is around 1.3 seconds and I did the same with the Mojo/MAX implemetation which takes around 5.5 seconds. My question is: shouldn't MAX be faster or at least the same as python? I'm not sure if this being a toy example does not really show the potential speedups you can get with MAX or If I'm getting something wrong in terms of the goal of MAX.
Thanks in advance!
12 replies