Revert "SWDEV-304151 - Reset file descriptor after Module Load"

This reverts commit 6ef56f09f1.

Reason for revert: To address SWDEV-316216

Change-Id: Ib8e6ac4b87c5e52757cd8f45958f39f012823c60


[ROCm/clr commit: a6b2294b93]
这个提交包含在:
Satyanvesh Dittakavi
2021-12-23 06:09:08 +00:00
父节点 abbb7b9bc5
当前提交 5cb71910d2
修改 3 个文件,包含 14 行新增22 行删除
+14 -1
查看文件
@@ -30,7 +30,20 @@ FatBinaryInfo::~FatBinaryInfo() {
delete fbd;
}
ResetFileInfo();
if (fdesc_ > 0) {
if (fsize_ && !amd::Os::MemoryUnmapFile(image_, fsize_)) {
guarantee(false, "Cannot unmap file");
}
if (!amd::Os::CloseFileHandle(fdesc_)) {
guarantee(false, "Cannot close file");
}
}
fname_ = std::string();
fdesc_ = amd::Os::FDescInit();
fsize_ = 0;
image_ = nullptr;
uri_ = std::string();
}
hipError_t FatBinaryInfo::ExtractFatBinary(const std::vector<hip::Device*>& devices) {