Skip to main content

IsNumericallyCorrect

Struct IsNumericallyCorrect 

Source
pub struct IsNumericallyCorrect;
Expand description

A linear GPU kernel produces the numerically correct output under the DeepReinforce exact-match protocol.

The protocol restricts kernel inputs to binary {0, 1} values so that floating-point associativity holds exactly within the FP16 integer range [0, 2048]. A FP32 CPU reference is then compared against the GPU output with bit-exact equality at every position where the reference value is at or below the threshold.

This is a runtime verification property: the obligation records that a numerical check has been specified, but the actual check runs in the consumer crate (e.g., Borsalino’s verify_numerical()).

§Limitations

Only applies to linear kernels. Non-linear operations (log, exp, tanh) produce irrational outputs that cannot be checked with exact match.

Reference: https://deep-reinforce.com/correctness_check.html

Trait Implementations§

Source§

impl Property for IsNumericallyCorrect

Source§

const NAME: &'static str = "IsNumericallyCorrect"

Human-readable name of the property.

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.