Skip to main content

IOptimizationProfile

Struct IOptimizationProfile 

Source
pub struct IOptimizationProfile { /* private fields */ }
Expand description

! ! \class IOptimizationProfile ! \brief Optimization profile for dynamic input dimensions and shape tensors. ! ! When building an ICudaEngine from an INetworkDefinition that has dynamically resizable inputs (at least ! one input tensor has one or more of its dimensions specified as -1) or shape input tensors, users need to specify ! at least one optimization profile. Optimization profiles are numbered 0, 1, … ! The first optimization profile that has been defined (with index 0) will be used by the ICudaEngine whenever no ! optimization profile has been selected explicitly. If none of the inputs are dynamic, the default optimization ! profile will be generated automatically unless it is explicitly provided by the user (this is possible but not ! required in this case). If more than a single optimization profile is defined, users may set a target how ! much additional weight space should be maximally allocated to each additional profile (as a fraction of the ! maximum, unconstrained memory). ! ! Users set optimum input tensor dimensions, as well as minimum and maximum input tensor dimensions. The builder ! selects the kernels that result in the lowest runtime for the optimum input tensor dimensions, and are valid for ! all input tensor sizes in the valid range between minimum and maximum dimensions. A runtime error will be raised ! if the input tensor dimensions fall outside the valid range for this profile. Likewise, users provide minimum, ! optimum, and maximum values for all shape tensor input values. ! ! \see IBuilderConfig::addOptimizationProfile() !

Trait Implementations§

Source§

impl ExternType for IOptimizationProfile

Source§

type Id = (n, v, i, n, f, e, r, _1, (), I, O, p, t, i, m, i, z, a, t, i, o, n, P, r, o, f, i, l, e)

A type-level representation of the type’s C++ namespace and type name. Read more
Source§

type Kind = Opaque

Source§

impl MakeCppStorage for IOptimizationProfile

Source§

unsafe fn allocate_uninitialized_cpp_storage() -> *mut IOptimizationProfile

Allocates heap space for this type in C++ and return a pointer to that space, but do not initialize that space (i.e. do not yet call a constructor). Read more
Source§

unsafe fn free_uninitialized_cpp_storage(arg0: *mut IOptimizationProfile)

Frees a C++ allocation which has not yet had a constructor called. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.