mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-08-17 07:50:18 +00:00
Remove trailing zeroes from end of ptx (#390)
This commit is contained in:
parent
f4cd545677
commit
74ff9ebf96
1 changed files with 7 additions and 1 deletions
|
@ -142,7 +142,7 @@ impl<'a> FatbinFile<'a> {
|
|||
}
|
||||
|
||||
pub unsafe fn decompress(&'a self) -> Result<Vec<u8>, FatbinError> {
|
||||
let payload = if self
|
||||
let mut payload = if self
|
||||
.header
|
||||
.flags
|
||||
.contains(FatbinFileHeaderFlags::CompressedLz4)
|
||||
|
@ -158,6 +158,12 @@ impl<'a> FatbinFile<'a> {
|
|||
unsafe { self.get_payload().to_vec() }
|
||||
};
|
||||
|
||||
|
||||
while payload.last() == Some(&0) {
|
||||
// remove trailing zeros
|
||||
payload.pop();
|
||||
}
|
||||
|
||||
Ok(payload)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue