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

Change-Id: I1d018918ed71f6d80846b3017f7a15f4ab496554
Tento commit je obsažen v:
kjayapra-amd
2020-05-22 17:56:21 -04:00
odevzdal Karthik Jayaprakash
rodič 618d66b5fe
revize 53a890b499
3 změnil soubory, kde provedl 6 přidání a 4 odebrání
Normální soubor → Spustitelný soubor
+1 -1
Zobrazit soubor
@@ -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();
}
Normální soubor → Spustitelný soubor
+4 -2
Zobrazit soubor
@@ -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) {
Normální soubor → Spustitelný soubor
+1 -1
Zobrazit soubor
@@ -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; }