pub struct WgpuBackend;Trait Implementations§
Source§impl Backend for WgpuBackend
impl Backend for WgpuBackend
Source§fn supported_ops(&self) -> &'static [OpKind]
fn supported_ops(&self) -> &'static [OpKind]
PLAN L4: declare which
OpKinds this backend can lower.
Default: empty slice = “no claim made — accept everything”
(preserves existing behavior; backends opt in by overriding).
When non-empty, the LegalizeForBackend pass will refuse to
compile a graph that contains an op outside this set, instead
of silently falling through to slower / wrong dispatch.Source§fn compile(
&self,
graph: Graph,
options: &CompileOptions,
) -> Box<dyn ExecutableGraph>
fn compile( &self, graph: Graph, options: &CompileOptions, ) -> Box<dyn ExecutableGraph>
Compile a graph for this backend with the given options.
Source§fn compile_lir(
&self,
lir: LirModule,
options: &CompileOptions,
) -> Box<dyn ExecutableGraph>
fn compile_lir( &self, lir: LirModule, options: &CompileOptions, ) -> Box<dyn ExecutableGraph>
Compile pre-optimized LIR (HIR → MIR → LIR pipeline output).
Default re-enters
Self::compile — backends should override
when they can reuse the embedded buffer plan.Source§fn compile_hir(
&self,
hir: HirModule,
device: Device,
options: &CompileOptions,
) -> Result<Box<dyn ExecutableGraph>, LowerError>
fn compile_hir( &self, hir: HirModule, device: Device, options: &CompileOptions, ) -> Result<Box<dyn ExecutableGraph>, LowerError>
HIR-first compile: lower blocks, run fusion pipeline, emit executable.
Source§fn compile_module(
&self,
module: GraphModule,
device: Device,
options: &CompileOptions,
) -> Result<Box<dyn ExecutableGraph>, LowerError>
fn compile_module( &self, module: GraphModule, device: Device, options: &CompileOptions, ) -> Result<Box<dyn ExecutableGraph>, LowerError>
[
GraphModule] compile — unified HIR/MIR/LIR entry.Auto Trait Implementations§
impl Freeze for WgpuBackend
impl RefUnwindSafe for WgpuBackend
impl Send for WgpuBackend
impl Sync for WgpuBackend
impl Unpin for WgpuBackend
impl UnsafeUnpin for WgpuBackend
impl UnwindSafe for WgpuBackend
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> 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