MRiabov
MRiabov
MModular
Created by MRiabov on 6/11/2024 in #questions
Google TPUs with Mojo language?
Sup, I'm creating a resource-intensive AI (at least 3-4x more resource-intensive than LLMs), so I'm considering a stack which would allow me fast computation cheap (while making dev relatively easy). Would using JAX and TPUs not work with Mojo? As far as I see, using TPUs is the absolute fastest we can get for deep learning. (or is it? Would MAX inference engine be faster?) Thanks everyone!
8 replies
MModular
Created by MRiabov on 6/3/2024 in #questions
How to iterate through an array/list?
Hello, I'm coming from Java to Mojo. It seems there is no support for iterating with "for" through a list - at least in the present version of Mojo. Here's the code:
def createFreeformExtrusion(lines:((Int,Int),(Int,Int),Optional[(Int,Int)])[], height)->String: # currently without curves.
code=""
for line in lines:
if line[2]:
def createFreeformExtrusion(lines:((Int,Int),(Int,Int),Optional[(Int,Int)])[], height)->String: # currently without curves.
code=""
for line in lines:
if line[2]:
Should work, doesn't it? It does work in Python. Thanks.
7 replies