#[non_exhaustive]pub enum ProgramBuildError {
Show 17 variants
ForeignValue,
ForeignImportRoot,
ForeignBindings,
UnsupportedControlFlow {
construct: &'static str,
},
InvalidImport {
source: ProgramStructuralError,
},
BindingTargetNotInput,
GuardTargetNotOperationOutput,
DuplicateBinding,
TooManyValues,
Arity {
expected: usize,
actual: usize,
},
Metadata {
source: Box<Error>,
},
OutputMetadataCount {
expected: usize,
actual: usize,
},
UndeclaredExtensionEffects {
family: &'static str,
},
UndeclaredExtensionAliases {
family: &'static str,
},
InvalidEffectResource {
family: &'static str,
source: EffectResourceError,
},
AliasOutOfBounds {
output: usize,
output_count: usize,
input: Option<usize>,
input_count: usize,
},
AliasCoverage {
expected: usize,
actual: usize,
},
}Expand description
Errors reported while adding semantic-program structure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ForeignValue
A value token was issued by another builder.
ForeignImportRoot
An import root belongs to another semantic program.
ForeignBindings
Import bindings were frozen for another semantic program.
UnsupportedControlFlow
Structured control flow is reserved for the later region/block model.
InvalidImport
A frozen source program failed import-time structural validation.
Fields
source: ProgramStructuralErrorBindingTargetNotInput
A binding target is a computed value rather than an external input.
GuardTargetNotOperationOutput
A shape guard target is not produced by a semantic operation.
DuplicateBinding
An external input already has a tensor binding.
TooManyValues
The builder cannot represent another value slot.
Arity
An operation received the wrong number of SSA inputs.
Metadata
Semantic dtype or shape inference failed.
OutputMetadataCount
Inference did not return the declared number of outputs.
UndeclaredExtensionEffects
An extension did not explicitly declare its observable effects.
UndeclaredExtensionAliases
An extension did not explicitly declare output aliases.
InvalidEffectResource
An extension declared an invalid resource family.
Fields
source: EffectResourceErrorTyped resource validation failure.
AliasOutOfBounds
An alias referenced an input or output outside the operation arity.
Fields
AliasCoverage
Alias declarations did not cover every output exactly once.
Trait Implementations§
Source§impl Debug for ProgramBuildError
impl Debug for ProgramBuildError
Source§impl Display for ProgramBuildError
impl Display for ProgramBuildError
Source§impl Error for ProgramBuildError
impl Error for ProgramBuildError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ProgramBuildError> for SemanticTransformError
impl From<ProgramBuildError> for SemanticTransformError
Source§fn from(source: ProgramBuildError) -> Self
fn from(source: ProgramBuildError) -> Self
Auto Trait Implementations§
impl Freeze for ProgramBuildError
impl !RefUnwindSafe for ProgramBuildError
impl Send for ProgramBuildError
impl Sync for ProgramBuildError
impl Unpin for ProgramBuildError
impl UnsafeUnpin for ProgramBuildError
impl !UnwindSafe for ProgramBuildError
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
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>
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>
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