Home
last modified time | relevance | path

Searched refs:nparray (Results 1 – 2 of 2) sorted by relevance

/llvm-project-15.0.7/mlir/python/mlir/runtime/
H A Dnp_to_memref.py83 def get_ranked_memref_descriptor(nparray): argument
85 ctp = as_ctype(nparray.dtype)
86 if nparray.ndim == 0:
88 x.allocated = nparray.ctypes.data
93 x = make_nd_memref_descriptor(nparray.ndim, ctp)()
94 x.allocated = nparray.ctypes.data
97 x.shape = nparray.ctypes.shape
102 x.strides = strides_ctype_t(*[x // nparray.itemsize for x in nparray.strides])
106 def get_unranked_memref_descriptor(nparray): argument
109 d.rank = nparray.ndim
[all …]
/llvm-project-15.0.7/mlir/test/Integration/Dialect/SparseTensor/python/
H A Dtest_stress.py76 def get_RankedTensorType_of_nparray(self, nparray: np.ndarray) -> ir.RankedTensorType:
80 return ir.RankedTensorType.get(nparray.shape,
81 self.dtype_to_irtype(nparray.dtype))