pub struct ResNetJit { /* private fields */ }Implementations§
Source§impl ResNetJit
impl ResNetJit
pub fn new(model: ResNet) -> Self
Sourcepub fn with_b_bound(self, max: usize) -> Self
pub fn with_b_bound(self, max: usize) -> Self
Override the upper bound for the b symbolic variable. Must be called before prepare/prepare_with_config. Panics if max < min.
Sourcepub fn with_b_min_bound(self, min: usize) -> Self
pub fn with_b_min_bound(self, min: usize) -> Self
Override the lower bound for the b symbolic variable. Must be called before prepare/prepare_with_config. Panics if min > max.
Sourcepub fn with_b_fixed(self, value: usize) -> Self
pub fn with_b_fixed(self, value: usize) -> Self
Pin b to a single value, making it a JIT-time constant. Sets both bounds to value so only value is accepted at execute time. Must be called before prepare/prepare_with_config. Panics on value == 0.
pub fn prepare(&mut self, images: InputSpec) -> Result<()>
pub fn prepare_with_config( &mut self, images: InputSpec, config: &PrepareConfig, ) -> Result<()>
pub fn images_mut(&mut self) -> Result<&mut Buffer>
pub fn output(&self) -> Result<&Buffer>
pub fn buffers(&self) -> Result<&[Buffer]>
pub fn output_buffers(&self) -> Result<Vec<&Buffer>>
pub fn input_buffer_ids(&self) -> Result<Vec<BufferId>>
pub fn prepared_kernels(&self) -> Result<Vec<&PreparedKernel>>
pub fn execute(&mut self) -> Result<()>
pub fn execute_profiled(&mut self) -> Result<Vec<KernelProfile>>
pub fn execute_with_vars(&mut self, vars: &[(&str, i64)]) -> Result<()>
pub fn execute_with_vars_profiled( &mut self, vars: &[(&str, i64)], ) -> Result<Vec<KernelProfile>>
Auto Trait Implementations§
impl Freeze for ResNetJit
impl !RefUnwindSafe for ResNetJit
impl Send for ResNetJit
impl Sync for ResNetJit
impl Unpin for ResNetJit
impl UnsafeUnpin for ResNetJit
impl !UnwindSafe for ResNetJit
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more