Method
__init__
(
self,
shape: Expr | None | list[PrimExpr] = None,
dtype: str = "float32",
vdevice: VDevice | None | str = None,
ndim: int = -1,
span: Span = None,
)
Source from the content-addressed store, hash-verified
| 168 | span: Span |
| 169 | |
| 170 | def __init__( |
| 171 | self, |
| 172 | shape: Expr | None | list[PrimExpr] = None, |
| 173 | dtype: str = "float32", |
| 174 | vdevice: VDevice | None | str = None, |
| 175 | ndim: int = -1, |
| 176 | span: Span = None, |
| 177 | ) -> None: |
| 178 | if isinstance(shape, list | tuple | Array): |
| 179 | shape = ShapeExpr(shape) |
| 180 | self.__init_handle_by_constructor__( |
| 181 | _ffi_api.TensorStructInfo, |
| 182 | shape, |
| 183 | dtype, |
| 184 | ndim, |
| 185 | vdevice, |
| 186 | span, # type: ignore |
| 187 | ) |
| 188 | |
| 189 | |
| 190 | @tvm_ffi.register_object("relax.TupleStructInfo") |
Callers
nothing calls this directly
Tested by
no test coverage detected