From cd7d8c49c537c6149371a3e7bb059773e42b3f8b Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 15 Aug 2018 14:13:08 -0400
Subject: [PATCH] P4 to Git Change 1594075 by skudchad@skudchad-lnx on
2018/08/15 14:00:33
SWDEV-145570 - [HIP] Fix some test failures
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_device_runtime.cpp#12 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#14 edit
[ROCm/hip commit: c998b3c3e279d36777e37628ea51f1404dde2e06]
---
projects/hip/api/hip/hip_device_runtime.cpp | 4 +++-
projects/hip/api/hip/hip_internal.hpp | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/projects/hip/api/hip/hip_device_runtime.cpp b/projects/hip/api/hip/hip_device_runtime.cpp
index 87a149a10a..f5e75d316b 100644
--- a/projects/hip/api/hip/hip_device_runtime.cpp
+++ b/projects/hip/api/hip/hip_device_runtime.cpp
@@ -155,7 +155,9 @@ hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device)
//FIXME: should we cache the props, or just select from deviceHandle->info_?
hipDeviceProp_t prop = {0};
hipError_t err = hipGetDeviceProperties(&prop, device);
- if (err != hipSuccess) HIP_RETURN(err);
+ if (err != hipSuccess) {
+ HIP_RETURN(err);
+ }
switch (attr) {
case hipDeviceAttributeMaxThreadsPerBlock:
diff --git a/projects/hip/api/hip/hip_internal.hpp b/projects/hip/api/hip/hip_internal.hpp
index a8a9c3eeb3..472051a379 100644
--- a/projects/hip/api/hip/hip_internal.hpp
+++ b/projects/hip/api/hip/hip_internal.hpp
@@ -67,7 +67,7 @@ extern amd::Memory* getMemoryObject(const void* ptr, size_t& offset);
#define HIP_RETURN(ret) \
hip::g_lastError = ret; \
- return ret; \
+ return hip::g_lastError; \
#endif // HIP_SRC_HIP_INTERNAL_H