Ehsan M. Kermani (Modular)
Ehsan M. Kermani (Modular)
MModular
Created by Hasan Yousef on 9/12/2024 in #questions
Embedding
3 replies
MModular
Created by ddrkredzzz on 8/27/2024 in #questions
?Missing? API Docs for MAX/gRPC/Kserve?
Yes, correct! MAX serve Mojo API was decommissioned.
5 replies
MModular
Created by ddrkredzzz on 8/27/2024 in #questions
?Missing? API Docs for MAX/gRPC/Kserve?
Thanks for your interest! Yes, it docs were pulled a while ago. Sorry for the inconvenience! We'll share more soon. Stay tuned!
5 replies
MModular
Created by amiya_mandal on 8/6/2024 in #questions
Its possible to create SIMD vector at runtime
What error do you get? Are you initializing inside the main function?
3 replies
MModular
Created by Ryulord on 8/5/2024 in #questions
MLIR Docs
Those are part of Modular's internals. It's an ongoing effort to limit their mentions in docs.
12 replies
MModular
Created by samufi on 8/2/2024 in #questions
How can I write asynchronous code?
Async mojo isn't fully baked yet. There've been great amount of progress internally so stay tuned!
11 replies
MModular
Created by tonystratum on 7/23/2024 in #questions
max engine leaking?
Hey, could you create an issue and fill in the details https://github.com/modularml/max/issues?
4 replies
MModular
Created by olko on 6/21/2024 in #questions
Mojo SDK API-KEY?
Generally official docs are maintained and blog contents are transient.
5 replies
MModular
Created by olko on 6/21/2024 in #questions
Mojo SDK API-KEY?
That is a bit old and things have changed. Thanks for checking!
5 replies
MModular
Created by olko on 6/21/2024 in #questions
Mojo SDK API-KEY?
There's no API KEY for Mojo. Please follow the instructions here https://docs.modular.com/mojo/manual/get-started/#1-install-mojo
5 replies
MModular
Created by Arvin_David on 4/7/2024 in #questions
Check type of a variable
For Python, we already have py.type, example https://github.com/modularml/devrel-extras/blob/main/tweetorials/py-obj/py.mojo#L14 for Mojo variant LSP is the best solid bet.
4 replies
MModular
Created by taalhaataahir01022001 on 6/4/2024 in #questions
Time taken in Inference session
That's the time spent on compiling the graph. We'll soon exposing caching so that subsequent runs will become much faster.
4 replies
MModular
Created by Analista on 5/13/2024 in #questions
How to read args from environment
5 replies
MModular
Created by Ray on 3/15/2024 in #questions
MODULAR_AUTH key not found
We'll share more on this. Stay tuned a bit longer 🙂
8 replies
MModular
Created by bunny on 5/9/2024 in #questions
Trait `Comparable`
I'm a fan composition so instead we can have PartialOrd trait which can make up Comparable by composing EquallyComparable
13 replies
MModular
Created by Martin Dudek on 5/10/2024 in #questions
What UnsafePointer can point to and allocate mem for?
from collections import Set
from testing import assert_true
from memory.unsafe_pointer import initialize_pointee_move

@value
struct IDStruct(KeyElement, Stringable):
var id: Int

fn __eq__(self, other: Self) -> Bool:
return self.id == other.id
fn __ne__(self, other: Self) -> Bool:
return self.id != other.id
fn __hash__(self) -> Int:
return hash(self.id)
fn __str__(self) -> String:
return str(self.id)

fn main() raises:
var ptr = UnsafePointer[Set[IDStruct]].alloc(10)
initialize_pointee_move(ptr, Set[IDStruct]())
assert_true(ptr[0] == Set[IDStruct]())
# second element
initialize_pointee_move(ptr + 1, Set[IDStruct](1))
assert_true(ptr[1] == Set[IDStruct](1))
from collections import Set
from testing import assert_true
from memory.unsafe_pointer import initialize_pointee_move

@value
struct IDStruct(KeyElement, Stringable):
var id: Int

fn __eq__(self, other: Self) -> Bool:
return self.id == other.id
fn __ne__(self, other: Self) -> Bool:
return self.id != other.id
fn __hash__(self) -> Int:
return hash(self.id)
fn __str__(self) -> String:
return str(self.id)

fn main() raises:
var ptr = UnsafePointer[Set[IDStruct]].alloc(10)
initialize_pointee_move(ptr, Set[IDStruct]())
assert_true(ptr[0] == Set[IDStruct]())
# second element
initialize_pointee_move(ptr + 1, Set[IDStruct](1))
assert_true(ptr[1] == Set[IDStruct](1))
15 replies
MModular
Created by Martin Dudek on 5/10/2024 in #questions
What UnsafePointer can point to and allocate mem for?
Also for completeness, another option currently is via initialize_pointee_move which becomes
15 replies
MModular
Created by Martin Dudek on 5/10/2024 in #questions
What UnsafePointer can point to and allocate mem for?
To know more about __get_address_as_uninit_lvalue see https://docs.modular.com/mojo/changelog#week-of-2023-04-17
15 replies
MModular
Created by Martin Dudek on 5/10/2024 in #questions
What UnsafePointer can point to and allocate mem for?
from collections import Set
from testing import assert_true

@value
struct IDStruct(KeyElement, Stringable):
var id: Int

fn __eq__(self, other: Self) -> Bool:
return self.id == other.id
fn __ne__(self, other: Self) -> Bool:
return self.id != other.id
fn __hash__(self) -> Int:
return hash(self.id)
fn __str__(self) -> String:
return str(self.id)

fn main() raises:
var ptr = UnsafePointer[Set[IDStruct]].alloc(10)
__get_address_as_uninit_lvalue(ptr.address) = Set[IDStruct]()
assert_true(ptr[0] == Set[IDStruct]())
# second element through offset like
__get_address_as_uninit_lvalue((ptr + 1).address) = Set[IDStruct](1)
assert_true(ptr[1] == Set[IDStruct](1))
from collections import Set
from testing import assert_true

@value
struct IDStruct(KeyElement, Stringable):
var id: Int

fn __eq__(self, other: Self) -> Bool:
return self.id == other.id
fn __ne__(self, other: Self) -> Bool:
return self.id != other.id
fn __hash__(self) -> Int:
return hash(self.id)
fn __str__(self) -> String:
return str(self.id)

fn main() raises:
var ptr = UnsafePointer[Set[IDStruct]].alloc(10)
__get_address_as_uninit_lvalue(ptr.address) = Set[IDStruct]()
assert_true(ptr[0] == Set[IDStruct]())
# second element through offset like
__get_address_as_uninit_lvalue((ptr + 1).address) = Set[IDStruct](1)
assert_true(ptr[1] == Set[IDStruct](1))
15 replies