pub struct TestTensor {
pub handle: TensorHandle<TestRuntime>,
pub host: HostData,
pub quantization: Option<QuantizationInfo>,
}Expand description
A test tensor which might be marked as quantized.
This structure couples the device handle, the host reference data,
and optional quantization metadata. If quantization is Some,
the handle on the device is expected to contain quantized data
(unless it’s a dummy quantization for testing purposes).
Fields§
§handle: TensorHandle<TestRuntime>The device handle.
host: HostDataThe host data, usually stored in f32 for easy reference comparison.
quantization: Option<QuantizationInfo>Optional quantization info.
Trait Implementations§
Source§impl Clone for TestTensor
impl Clone for TestTensor
Source§fn clone(&self) -> TestTensor
fn clone(&self) -> TestTensor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TestTensor
impl !RefUnwindSafe for TestTensor
impl Send for TestTensor
impl Sync for TestTensor
impl Unpin for TestTensor
impl UnsafeUnpin for TestTensor
impl !UnwindSafe for TestTensor
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