From 8daab29f7f32f62b46ac085680706059322f9def Mon Sep 17 00:00:00 2001 From: Satyanvesh Dittakavi Date: Thu, 30 Jan 2025 12:27:38 +0000 Subject: [PATCH] SWDEV-477584 - hipExtGetLastError should return the immediate previous API error hipGetLastError should return the error by any of the previous APIs in the same host thread to match the CUDA behavior, whereas hipExtGetLastError will return the error by the immediate previous API. This Ext API was added earlier to facilitate the existing HIP apps which are following the current behavior of hipGetLastError Change-Id: I61e95b1fc136cc761e2434e02187b7ed2598b733 [ROCm/clr commit: 4b443f813335e40bf0a2b0686c311a19164ce30f] --- projects/clr/hipamd/src/hip_error.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/clr/hipamd/src/hip_error.cpp b/projects/clr/hipamd/src/hip_error.cpp index 41c608a0b4..0e2cfb9fe6 100644 --- a/projects/clr/hipamd/src/hip_error.cpp +++ b/projects/clr/hipamd/src/hip_error.cpp @@ -26,8 +26,8 @@ namespace hip { hipError_t hipExtGetLastError() { HIP_INIT_API(hipExtGetLastError); - hipError_t err = hip::tls.last_error_; - hip::tls.last_error_ = hipSuccess; + hipError_t err = hip::tls.last_command_error_; + hip::tls.last_command_error_ = hipSuccess; return err; }