SWDEV-416218 - Set the image mapped flag correctly on COMGR path.
Change-Id: I6c0908731f10c8ff5b3e159c0cfb68ce096c7bdf
[ROCm/clr commit: d18f4b1ad4]
This commit is contained in:
committed by
Karthik Jayaprakash
parent
0309108c97
commit
6b628eca2e
@@ -94,11 +94,13 @@ hipError_t FatBinaryInfo::ExtractFatBinaryUsingCOMGR(const std::vector<hip::Devi
|
||||
return hipErrorInvalidValue;
|
||||
|
||||
// If image_ is nullptr, then file path is passed via hipMod* APIs, so map the file.
|
||||
if (image_ == nullptr && !amd::Os::MemoryMapFileDesc(fdesc_, fsize_, foffset_, &image_)
|
||||
&& (image_mapped_ = true)) {
|
||||
LogError("Cannot map the file descriptor");
|
||||
amd::Os::CloseFileHandle(fdesc_);
|
||||
return hipErrorInvalidValue;
|
||||
if (image_ == nullptr) {
|
||||
if(!amd::Os::MemoryMapFileDesc(fdesc_, fsize_, foffset_, &image_)) {
|
||||
LogError("Cannot map the file descriptor");
|
||||
amd::Os::CloseFileHandle(fdesc_);
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
image_mapped_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user