SWDEV-237467 - Return proper hip error codes incase of ROCclr IPC API failures.

Change-Id: I1d018918ed71f6d80846b3017f7a15f4ab496554


[ROCm/clr commit: 53a890b499]
此提交包含在:
kjayapra-amd
2020-05-22 17:56:21 -04:00
提交者 Karthik Jayaprakash
父節點 0cbaf84fa6
當前提交 c1e072980d
共有 3 個檔案被更改,包括 6 行新增4 行删除
一般檔案 → 可執行檔
+1 -1
查看文件
@@ -761,7 +761,7 @@ class Memory : public amd::HeapObject {
//! Returns CPU pointer to HW state
virtual const address cpuSrd() const { return nullptr; }
virtual void IpcCreate(size_t offset, size_t* mem_size, void* handle) const {
virtual bool IpcCreate(size_t offset, size_t* mem_size, void* handle) const {
ShouldNotReachHere();
}
+4 -2
查看文件
@@ -190,7 +190,7 @@ void* Memory::cpuMap(device::VirtualDevice& vDev, uint flags, uint startLayer, u
return mapTarget;
}
void Memory::IpcCreate(size_t offset, size_t* mem_size, void* handle) const {
bool Memory::IpcCreate(size_t offset, size_t* mem_size, void* handle) const {
void* dev_ptr = nullptr;
hsa_status_t hsa_status = HSA_STATUS_SUCCESS;
@@ -213,8 +213,10 @@ void Memory::IpcCreate(size_t offset, size_t* mem_size, void* handle) const {
if (hsa_status != HSA_STATUS_SUCCESS) {
LogPrintfError("Failed to create memory for IPC, failed with hsa_status: %d \n", hsa_status);
return;
return false;
}
return true;
}
void Memory::cpuUnmap(device::VirtualDevice& vDev) {
+1 -1
查看文件
@@ -108,7 +108,7 @@ class Memory : public device::Memory {
void* PersistentHostPtr() const { return persistent_host_ptr_; }
void IpcCreate (size_t offset, size_t* mem_size, void* handle) const override;
bool IpcCreate (size_t offset, size_t* mem_size, void* handle) const override;
//! Validates allocated memory for possible workarounds
virtual bool ValidateMemory() { return true; }