Add hipDeviceSchedule* support to queue wait
Change-Id: Iffa7a356500b026f3737c3f5719ca9f62b10d855
Tá an tiomantas seo le fáil i:
@@ -268,7 +268,7 @@ hipError_t hipSetDeviceFlags( unsigned int flags)
|
||||
{
|
||||
HIP_INIT_API(flags);
|
||||
|
||||
hipError_t e;
|
||||
hipError_t e = hipSuccess;
|
||||
|
||||
auto * ctx = ihipGetTlsDefaultCtx();
|
||||
|
||||
@@ -276,7 +276,25 @@ hipError_t hipSetDeviceFlags( unsigned int flags)
|
||||
// TODO : Review error handling behavior for this function, it often returns ErrorSetOnActiveProcess
|
||||
if (ctx) {
|
||||
ctx->_ctxFlags = ctx->_ctxFlags | flags;
|
||||
e = hipSuccess;
|
||||
if (flags & hipDeviceScheduleMask) {
|
||||
switch (hipDeviceScheduleMask) {
|
||||
case hipDeviceScheduleAuto:
|
||||
case hipDeviceScheduleSpin:
|
||||
case hipDeviceScheduleYield:
|
||||
case hipDeviceScheduleBlockingSync:
|
||||
e = hipSuccess;
|
||||
break;
|
||||
default:
|
||||
e = hipErrorInvalidValue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned supportedFlags = hipDeviceScheduleMask | hipDeviceMapHost | hipDeviceLmemResizeToMax;
|
||||
|
||||
if (flags & ~supportedFlags) {
|
||||
e = hipErrorInvalidValue;
|
||||
}
|
||||
} else {
|
||||
e = hipErrorInvalidDevice;
|
||||
}
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir