#[repr(C)]pub struct OpObj {
pub index: u32,
pub name: String,
pub doc: String,
pub args_info: Array<ArgumentInfo>,
pub ty_args_info: Array<ArgumentInfo>,
pub var_args_info: Option<ArgumentInfo>,
pub var_ty_args_info: Option<ArgumentInfo>,
pub attrs_type_key: String,
/* private fields */
}Expand description
Complete field view of a native operator registry entry; construction is registry-only.
Hand-written (the block is skipped): attrs_type_index, validator, and
validator_is_custom are not reflected, so the generator can only emit an opaque
view of OpObj. Keep the members in step with OpObj in include/tvm/ir/op.h.
Fields§
§index: u32§name: String§doc: String§args_info: Array<ArgumentInfo>§ty_args_info: Array<ArgumentInfo>§var_args_info: Option<ArgumentInfo>§var_ty_args_info: Option<ArgumentInfo>§attrs_type_key: StringImplementations§
Source§impl OpObj
impl OpObj
Sourcepub fn attrs_type_index(&self) -> u32
pub fn attrs_type_index(&self) -> u32
Runtime type index corresponding to attrs_type_key (not reflected natively).
Sourcepub fn validator(&self) -> &Any
pub fn validator(&self) -> &Any
Process-local validation callback (not reflected natively): a native function address
held as an opaque pointer, a packed function, or None when there is none.
Sourcepub fn validator_is_custom(&self) -> bool
pub fn validator_is_custom(&self) -> bool
Whether the validator was explicitly registered rather than generated (not reflected natively).
Trait Implementations§
Source§impl ObjectCore for OpObj
impl ObjectCore for OpObj
Source§const TYPE_DEPTH: i32 = 2i32
const TYPE_DEPTH: i32 = 2i32
Depth of this type in the object inheritance tree. Read more
fn type_index() -> i32
Source§unsafe fn object_header_mut(this: &mut Self) -> &mut TVMFFIObject
unsafe fn object_header_mut(this: &mut Self) -> &mut TVMFFIObject
Return the object header
This function is implemented as a static function so Read more
Auto Trait Implementations§
impl !Freeze for OpObj
impl RefUnwindSafe for OpObj
impl !Send for OpObj
impl !Sync for OpObj
impl Unpin for OpObj
impl UnwindSafe for OpObj
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more