Struct KernelSpec
pub struct KernelSpec {
pub id: String,
pub semantic_version: u32,
pub entry_point: String,
pub description: String,
pub buffers: Vec<BufferSpec>,
pub ops: Vec<Op>,
pub shared_memory: Vec<SharedMemorySpec>,
}Fields§
§id: String§semantic_version: u32§entry_point: String§description: String§buffers: Vec<BufferSpec>§ops: Vec<Op>Workgroup-shared arrays the kernel uses. Skipped during serialization when empty so existing kernels’ semantic hashes are unchanged.
Implementations§
§impl KernelSpec
impl KernelSpec
pub fn validate(&self) -> Result<(), ForgeError>
pub fn validate(&self) -> Result<(), ForgeError>
Validates the kernel spec.
pub fn semantic_hash(&self) -> Result<String, ForgeError>
pub fn semantic_hash(&self) -> Result<String, ForgeError>
Content hash of the kernel spec.
pub fn required_intrinsics(&self) -> Vec<Intrinsic>
pub fn required_intrinsics(&self) -> Vec<Intrinsic>
Hardware intrinsics this kernel requires, gathered recursively through loop bodies. The capability checker uses these to prune schedules on adapters lacking the necessary hardware (plan §6).
§impl KernelSpec
impl KernelSpec
pub fn to_graph(&self) -> Result<ComputeGraph, ForgeError>
pub fn to_graph(&self) -> Result<ComputeGraph, ForgeError>
Bridge a single-kernel KernelSpec to a one-node ComputeGraph — the Phase-1
path for the function-backed WGSL kernels (gemm/gemv/fft). Dims are
runtime-parameterized (read from a params buffer), so the node carries 0 (dynamic)
shapes; the emitted WGSL is dimension-independent. Returns Err for ids without a
graph bridge yet — the caller keeps the legacy emit branch for those.
Trait Implementations§
§impl Clone for KernelSpec
impl Clone for KernelSpec
§fn clone(&self) -> KernelSpec
fn clone(&self) -> KernelSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for KernelSpec
impl Debug for KernelSpec
§impl<'de> Deserialize<'de> for KernelSpec
impl<'de> Deserialize<'de> for KernelSpec
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<KernelSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<KernelSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for KernelSpec
§impl PartialEq for KernelSpec
impl PartialEq for KernelSpec
§impl Serialize for KernelSpec
impl Serialize for KernelSpec
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for KernelSpec
Auto Trait Implementations§
impl Freeze for KernelSpec
impl RefUnwindSafe for KernelSpec
impl Send for KernelSpec
impl Sync for KernelSpec
impl Unpin for KernelSpec
impl UnsafeUnpin for KernelSpec
impl UnwindSafe for KernelSpec
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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