SWDEV-269246 - Fixed null-case logic for hipCtxPopCurrent
Change-Id: Ic173980caccde8afee85a75c55a5d536f421549e
[ROCm/hip commit: 76abab2f24]
Этот коммит содержится в:
коммит произвёл
Arya Rafii
родитель
54e273fa87
Коммит
ad0b9c80f2
@@ -214,12 +214,10 @@ hipError_t hipCtxPopCurrent(hipCtx_t* ctx) {
|
||||
HIP_INIT_API(hipCtxPopCurrent, ctx);
|
||||
|
||||
hip::Device** dev = reinterpret_cast<hip::Device**>(ctx);
|
||||
if (dev == nullptr) {
|
||||
HIP_RETURN(hipErrorInvalidContext);
|
||||
}
|
||||
|
||||
if (!g_ctxtStack.empty()) {
|
||||
*dev = g_ctxtStack.top();
|
||||
if (dev != nullptr) {
|
||||
*dev = g_ctxtStack.top();
|
||||
}
|
||||
g_ctxtStack.pop();
|
||||
} else {
|
||||
DevLogError("Context Stack empty \n");
|
||||
|
||||
Ссылка в новой задаче
Block a user