pub struct CompileReport { /* private fields */ }Expand description
Structured evidence tied to the exact compiler which produced it.
Implementations§
Source§impl CompileReport
impl CompileReport
Sourcepub fn guidance(&self) -> Result<ReportGuidance>
pub fn guidance(&self) -> Result<ReportGuidance>
Suggest residency and LDS layout experiments using producer-supplied thresholds. Unavailable evidence and unvalidated bank models yield no recommendations. All joint residency limits must be captured.
Source§impl CompileReport
impl CompileReport
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Reject unrecognized evidence instead of interpreting a different schema.
Sourcepub fn compiler_identity(&self) -> &str
pub fn compiler_identity(&self) -> &str
Content digest of the producing compiler library.
Sourcepub fn processor_mode(&self) -> ProcessorMode
pub fn processor_mode(&self) -> ProcessorMode
Requested AMDGPU execution policy.
Sourcepub fn json(&self) -> &Value
pub fn json(&self) -> &Value
Original versioned JSON, including evidence not represented by accessors.
Examples found in repository?
279fn prepare(
280 stream: &mut Stream,
281 compiler: &Compiler,
282 case: &Case,
283 shared: Option<std::sync::Arc<Vec<Buffer>>>,
284) -> Result<Arm> {
285 let artifact = compiler.module(case.source).compile(&case.spec)?;
286 let kernel = unsafe { stream.load_artifact(&artifact) }?;
287 let constants = Constants::indices(&kernel, &case.indices)?;
288 let buffers = if let Some(buffers) = shared {
289 buffers
290 } else {
291 std::sync::Arc::new(
292 case.data
293 .iter()
294 .map(|data| {
295 let buffer = stream.allocate(data.len())?;
296 stream.upload_blocking(buffer.binding(), data)?;
297 Ok(buffer)
298 })
299 .collect::<Result<Vec<_>>>()?,
300 )
301 };
302 let bindings: Vec<_> = buffers.iter().map(Buffer::binding).collect();
303 let mut graph = stream.graph()?;
304 let mut prior = None;
305 for _ in 0..32 {
306 prior = Some(unsafe {
307 graph.dispatch(
308 prior.as_slice(),
309 &kernel,
310 case.grid,
311 case.block,
312 &constants,
313 &bindings,
314 )
315 }?);
316 }
317 let identity = serde_json::json!({"compiler":artifact.compiler_identity(), "artifact":hrx::bundle::digest(artifact.bytes()),
318 "report":artifact.report().map(|report| report.json())});
319 Ok(Arm {
320 graph: graph.finish()?,
321 buffers,
322 identity,
323 })
324}Sourcepub fn expansions(&self) -> Result<Option<Vec<Expansion>>>
pub fn expansions(&self) -> Result<Option<Vec<Expansion>>>
Per-selection lowering expansion, available in summary and detailed reports. Missing collection is distinct from an empty collection.
Sourcepub fn entries(&self) -> Result<Vec<EntryResources>>
pub fn entries(&self) -> Result<Vec<EntryResources>>
Resource summaries, preserving unknown values rather than reporting zero.
Sourcepub fn wait_reasons(&self) -> Result<Option<Vec<WaitReason>>>
pub fn wait_reasons(&self) -> Result<Option<Vec<WaitReason>>>
Wait explanations from detailed reports. None means this evidence was
not collected; Some([]) means it was collected with no wait rows.
Sourcepub fn wait_reason_changes(
&self,
after: &Self,
) -> Result<Option<Vec<WaitReasonChange>>>
pub fn wait_reason_changes( &self, after: &Self, ) -> Result<Option<Vec<WaitReasonChange>>>
Compare wait reasons by semantic identity. None means at least one
report lacks wait evidence; an empty vector means both collected no rows.
Added/removed reasons have null deltas, never invented zero counts.
Sourcepub fn changes(&self, after: &Self) -> Result<Vec<EntryChange>>
pub fn changes(&self, after: &Self) -> Result<Vec<EntryChange>>
Compare named entries after checking compiler, schema and target identity. Added/removed entries are explicit; unknown analysis is never treated as zero.
Sourcepub fn ensure_comparable(&self, other: &Self) -> Result<()>
pub fn ensure_comparable(&self, other: &Self) -> Result<()>
Check the minimum identity contract for comparing compiler evidence. Source and configuration may differ: those are the experiment variables.
Trait Implementations§
Source§impl Clone for CompileReport
impl Clone for CompileReport
Source§impl Debug for CompileReport
impl Debug for CompileReport
Source§impl<'de> Deserialize<'de> for CompileReport
impl<'de> Deserialize<'de> for CompileReport
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for CompileReport
impl RefUnwindSafe for CompileReport
impl Send for CompileReport
impl Sync for CompileReport
impl Unpin for CompileReport
impl UnsafeUnpin for CompileReport
impl UnwindSafe for CompileReport
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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