|
tvm
|
Checked zero-state view over an ordinary VarNode with TensorType. More...
#include <expr.h>
Public Types | |
| using | ContainerType = VarNode |
Public Member Functions | |
| TVM_TIRX_DLL | TensorVar (ffi::String name, TensorType type, Location loc=UnknownLoc()) |
| Construct a fresh tensor variable from an explicit TensorType. | |
| TensorVar (Var var) | |
| Create a checked tensor view over an existing ordinary Var. | |
| Var | var () const |
| Return the ordinary variable view over the same identity. | |
| TensorType | type () const |
| Return the tensor type carried by the ordinary variable. | |
| const ffi::String & | name () const |
| Return the tensor's diagnostic name. | |
| const Location & | loc () const |
| Return the source location carried by the ordinary Var. | |
| Expr | data () const |
| Project the physical pointer established by the definition site. | |
| ffi::String | scope () const |
| Return the storage scope associated with this tensor. | |
| TVM_TIRX_DLL bool | IsScalar (bool alloc_or_decl=true) const |
| Return a new tensor with the allocated address. | |
| PrimType | ElementType () const |
| TensorVar (ffi::ObjectPtr< VarNode > node) | |
| TensorVar (ffi::UnsafeInit tag) | |
| TVM_FFI_DEFINE_DEFAULT_COPY_MOVE_AND_ASSIGN (TensorVar) | |
| const TensorTypeNode * | operator-> () const |
| const VarNode * | get () const |
Public Member Functions inherited from tvm::Var | |
| TVM_TIRX_DLL | Var (ffi::String name, ffi::Optional< Type > ty_annotation, Location loc=UnknownLoc()) |
| TVM_TIRX_DLL Var | CopyWithName (const ffi::String &name) const |
| Return a fresh ordinary Var with the same type and a new name. | |
| TVM_TIRX_DLL Var | CopyWithSuffix (const ffi::String &suffix) const |
| Return a fresh ordinary Var with a suffix appended to its name. | |
| TVM_TIRX_DLL Var | CopyWithDType (PrimType dtype) const |
| Return a fresh ordinary Var with a new primitive type. | |
| TVM_TIRX_DLL Var | CopyWithType (Type type) const |
| Return a fresh ordinary Var with a new type, retaining its metadata. | |
| Var (ffi::ObjectPtr< VarNode > node) | |
| TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE (Var, Expr, VarNode) | |
Public Member Functions inherited from tvm::Expr | |
| bool | operator== (const Expr &other) const =delete |
| bool | operator!= (const Expr &other) const =delete |
| bool | operator< (const Expr &other) const =delete |
| Expr (ffi::ObjectPtr< ExprNode > node) | |
| TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE (Expr, ffi::ObjectRef, ExprNode) | |
Static Public Attributes | |
| static constexpr bool | _type_is_nullable = false |
| static constexpr bool | _type_container_is_exact = false |
Checked zero-state view over an ordinary VarNode with TensorType.
TensorVar does not introduce a runtime object or a second identity. It safely widens to Var, and get() returns the underlying VarNode used by identity-sensitive maps. operator-> exposes the immutable TensorType access contract for concise compiler-side metadata access.
|
explicit |
Construct a fresh tensor variable from an explicit TensorType.
|
inlineexplicit |
Create a checked tensor view over an existing ordinary Var.
|
inlineexplicit |
|
inlineexplicit |
|
inline |
Project the physical pointer established by the definition site.
|
inline |
|
inline |
| TVM_TIRX_DLL bool tvm::tirx::TensorVar::IsScalar | ( | bool | alloc_or_decl = true | ) | const |
|
inline |
|
inline |
Return the tensor's diagnostic name.
|
inline |
|
inline |
Return the storage scope associated with this tensor.
| tvm::tirx::TensorVar::TVM_FFI_DEFINE_DEFAULT_COPY_MOVE_AND_ASSIGN | ( | TensorVar | ) |
|
inline |
Return the tensor type carried by the ordinary variable.
|
inline |
Return the ordinary variable view over the same identity.
|
staticconstexpr |
|
staticconstexpr |