Searched refs:nparray (Results 1 – 2 of 2) sorted by relevance
83 def get_ranked_memref_descriptor(nparray): argument85 ctp = as_ctype(nparray.dtype)86 if nparray.ndim == 0:88 x.allocated = nparray.ctypes.data93 x = make_nd_memref_descriptor(nparray.ndim, ctp)()94 x.allocated = nparray.ctypes.data97 x.shape = nparray.ctypes.shape102 x.strides = strides_ctype_t(*[x // nparray.itemsize for x in nparray.strides])106 def get_unranked_memref_descriptor(nparray): argument109 d.rank = nparray.ndim[all …]
76 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))