Skip to main content

PtxBackend

Struct PtxBackend 

Source
pub struct PtxBackend { /* private fields */ }
Expand description

PTX backend — Backend impl wrapping a MultiEmitterBackend so the v0.1.0 scaffold drives through the same routing the future rustc_codegen_nvvm + aprender-gpu quorum will use.

Implementations§

Source§

impl PtxBackend

Source

pub fn new() -> Self

Source

pub fn new_with_matmul_specialist() -> Self

PMAT-280 — End-to-end validation constructor for Section 29’s multi-emitter routing.

Builds a PtxBackend whose MultiEmitterBackend carries the ScaffoldPtxEmitter in the general slot AND a [MatmulSpecialistEmitter] in the specialist slot under QuorumPolicy::PreferSpecialist. The specialist matches only modules whose name starts with matmul_ — the shape filter real specialists like aprender-gpu would use to claim GEMM-shaped kernels.

This isn’t registered in default_session() — production at v0.1.0+ still uses PtxBackend::new. The constructor exists so tests + future integrations can exercise the MultiEmitterBackend::new_with_specialist path against real production code (not just mock tests). It’s the smallest concrete proof that the §29 routing layer is end-to-end usable, ahead of the heavy rustc_codegen_nvvm / aprender-gpu integrations that will eventually replace these placeholders.

Trait Implementations§

Source§

impl Backend for PtxBackend

Source§

fn name(&self) -> &'static str

Human-readable backend name, e.g. “rust”, “ptx”, “wgsl”.
Source§

fn targets(&self) -> &[Target]

Targets this backend can emit. Each Target variant is owned by exactly one Backend impl (target_ownership invariant).
Source§

fn lower( &self, module: &Module, config: &BackendConfig, ) -> Result<Artifact, BackendError>

Lower a meta-HIR module under the given config to an Artifact. Read more
Source§

impl Default for PtxBackend

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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.