SWDEV-407691 - Always unmap file if HIP Runtime unbundler is used.

Change-Id: Ica15df31dfee3c495cf067a998e7e3b7c7397f40


[ROCm/clr commit: aa7c62db37]
Esse commit está contido em:
kjayapra-amd authored and Karthik Jayaprakash committed 2023-06-28 10:20:49 -04:00
1 pai 1de5c73c38
commit 8969a60e98
1 file changed
+3 -1
+3 -1
Ver Arquivo
@@ -35,7 +35,9 @@ FatBinaryInfo::~FatBinaryInfo() {
}
if (fdesc_ > 0) {
if (fsize_ && image_mapped_ && !amd::Os::MemoryUnmapFile(image_, fsize_)) {
if (fsize_
&& (HIP_USE_RUNTIME_UNBUNDLER || image_mapped_)
&& !amd::Os::MemoryUnmapFile(image_, fsize_)) {
guarantee(false, "Cannot unmap file for fdesc: %d fsize: %d \n", fdesc_, fsize_);
}
if (!amd::Os::CloseFileHandle(fdesc_)) {