pub struct JitLog {
pub info: String,
pub error: String,
}Expand description
Log output from JIT compilation.
After calling Module::from_ptx_with_options, this struct
contains any informational or error messages emitted by the
JIT compiler.
Use JitLog::parse_diagnostics to obtain structured
JitDiagnostic entries instead of parsing the raw strings.
Fields§
§info: StringInformational messages from the JIT compiler.
error: StringError messages from the JIT compiler.
Implementations§
Source§impl JitLog
impl JitLog
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Returns true if the error buffer is non-empty.
Sourcepub fn parse_diagnostics(&self) -> Vec<JitDiagnostic>
pub fn parse_diagnostics(&self) -> Vec<JitDiagnostic>
Parse both log buffers into a Vec of structured JitDiagnostic
entries.
Lines that do not match the ptxas diagnostic format are included as
JitSeverity::Info diagnostics with no kernel or line information,
unless they are entirely blank.
§Message format
The CUDA JIT compiler emits lines in one of these formats:
ptxas {severity} : '{kernel}', line {n}; {type} : {message}
ptxas {severity} : '{kernel}' {message}
ptxas {severity} : {message}This method normalises all of those into JitDiagnostic values.
Sourcepub fn errors(&self) -> Vec<JitDiagnostic>
pub fn errors(&self) -> Vec<JitDiagnostic>
Return only the JitDiagnostic entries whose severity is
JitSeverity::Error or JitSeverity::Fatal.
Sourcepub fn warnings(&self) -> Vec<JitDiagnostic>
pub fn warnings(&self) -> Vec<JitDiagnostic>
Return only the JitDiagnostic entries whose severity is
JitSeverity::Warning.