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: 4b443f8133]
This commit is contained in:
Satyanvesh Dittakavi committed 2025-02-06 23:30:48 -05:00
1 parent 6a00aa8d61
commit 8daab29f7f
1 file changed
+2 -2
+2 -2
View File
@@ -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;
}