mlir.runtime¶
Submodules¶
Attributes¶
Classes¶
A ctype representation for MLIR's Double Complex. |
|
A ctype representation for MLIR's Float Complex. |
|
A ctype representation for MLIR's Float16. |
|
A ctype representation for MLIR's BFloat16. |
|
A ctype representation for MLIR's Float8E5M2. |
|
Creates a ctype struct for memref descriptor |
Functions¶
|
Converts dtype to ctype. |
|
Converts ctypes array back to numpy dtype array. |
|
|
|
Returns a ranked memref descriptor for the given numpy array. |
|
Returns a generic/unranked memref descriptor for the given numpy array. |
|
Moves the supplied ctypes pointer ahead by |
|
Converts unranked memrefs to numpy arrays. |
|
Converts ranked memrefs to numpy arrays. |
Package Contents¶
- mlir.runtime.ml_dtypes = None¶
- class mlir.runtime.C128¶
Bases:
ctypes.StructureA ctype representation for MLIR’s Double Complex.
- _fields_¶
- class mlir.runtime.C64¶
Bases:
ctypes.StructureA ctype representation for MLIR’s Float Complex.
- _fields_¶
- class mlir.runtime.F16¶
Bases:
ctypes.StructureA ctype representation for MLIR’s Float16.
- _fields_¶
- class mlir.runtime.BF16¶
Bases:
ctypes.StructureA ctype representation for MLIR’s BFloat16.
- _fields_¶
- class mlir.runtime.F8E5M2¶
Bases:
ctypes.StructureA ctype representation for MLIR’s Float8E5M2.
- _fields_¶
- mlir.runtime.as_ctype(dtp)¶
Converts dtype to ctype.
- mlir.runtime.to_numpy(array)¶
Converts ctypes array back to numpy dtype array.
- mlir.runtime.make_nd_memref_descriptor(rank, dtype)¶
- mlir.runtime.make_zero_d_memref_descriptor(dtype)¶
- class mlir.runtime.UnrankedMemRefDescriptor¶
Bases:
ctypes.StructureCreates a ctype struct for memref descriptor
- _fields_¶
- mlir.runtime.get_ranked_memref_descriptor(nparray)¶
Returns a ranked memref descriptor for the given numpy array.
- mlir.runtime.get_unranked_memref_descriptor(nparray)¶
Returns a generic/unranked memref descriptor for the given numpy array.
- mlir.runtime.move_aligned_ptr_by_offset(aligned_ptr, offset)¶
Moves the supplied ctypes pointer ahead by
offsetelements.
- mlir.runtime.unranked_memref_to_numpy(unranked_memref, np_dtype)¶
Converts unranked memrefs to numpy arrays.
- mlir.runtime.ranked_memref_to_numpy(ranked_memref)¶
Converts ranked memrefs to numpy arrays.