mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-04-19 16:04:44 +00:00
Improve logging of dumps
This commit is contained in:
parent
dd915688bd
commit
50e793e869
2 changed files with 14 additions and 3 deletions
|
@ -491,7 +491,8 @@ unsafe fn record_submodules(
|
|||
if fatbin_file_kind == FATBIN_FILE_HEADER_KIND_PTX {
|
||||
let decompressed = decompress_kernel_module(fatbin_file);
|
||||
match decompressed {
|
||||
Some(decompressed) => {
|
||||
Some(mut decompressed) => {
|
||||
decompressed.pop(); // remove trailing zero
|
||||
state.record_new_submodule(module, version, &*decompressed, fn_logger, "ptx")
|
||||
}
|
||||
None => fn_logger.log(log::LogEntry::Lz4DecompressionFailure),
|
||||
|
|
|
@ -368,7 +368,7 @@ impl Display for LogEntry {
|
|||
observed,
|
||||
} => write!(
|
||||
f,
|
||||
"Unexected field {}. Expected: [{}], observed: {}",
|
||||
#"Unexected field {}. Expected one of: {{{}}}, observed: {}"#,
|
||||
field_name,
|
||||
expected
|
||||
.iter()
|
||||
|
@ -381,7 +381,17 @@ impl Display for LogEntry {
|
|||
arg_name,
|
||||
expected,
|
||||
observed,
|
||||
} => write!(f, "Unexected argument"),
|
||||
} => write!(
|
||||
f,
|
||||
"Unexpected argument {}. Expected one of: {{{}}}, observed: {}",
|
||||
arg_name,
|
||||
expected
|
||||
.iter()
|
||||
.map(|x| x.to_string())
|
||||
.collect::<Vec<_>>()
|
||||
.join(", "),
|
||||
observed
|
||||
),
|
||||
LogEntry::MalformedFunctionName(e) => e.fmt(f),
|
||||
LogEntry::FunctionParameter { name, value } => write!(f, "{}: {}", name, value),
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue