SWDEV-342025 - Fix hipEventCreateWithFlags API

- Return hipErrorInvalidValue if hipEventInterprocess flag is set, but hipEventDisableTiming flag isn't set

Change-Id: Ifbb9d83b018c360f312083bb25dba1187bcdaefa
Этот коммит содержится в:
Rakesh Roy
2022-06-20 21:33:24 +05:30
коммит произвёл Rakesh Roy
родитель 5d385fa0e2
Коммит 21d7f35c84
+4 -1
Просмотреть файл
@@ -261,7 +261,10 @@ hipError_t ihipEventCreateWithFlags(hipEvent_t* event, unsigned flags) {
const unsigned releaseFlags = (hipEventReleaseToDevice | hipEventReleaseToSystem);
// can't set any unsupported flags.
// can't set both release flags
const bool illegalFlags = (flags & ~supportedFlags) || (flags & releaseFlags) == releaseFlags;
// if hipEventInterprocess flag is set, then hipEventDisableTiming flag also must be set
const bool illegalFlags = (flags & ~supportedFlags) ||
((flags & releaseFlags) == releaseFlags) ||
((flags & hipEventInterprocess) && !(flags & hipEventDisableTiming));
if (!illegalFlags) {
hip::Event* e = nullptr;
if (flags & hipEventInterprocess) {