SWDEV-534394 - Add test for kernel launch stream on different device (#565)

Co-authored-by: Pengda Xie <pengda.xie@amd.com>
Αυτή η υποβολή περιλαμβάνεται σε:
systems-assistant[bot]
2025-08-26 23:24:57 -07:00
υποβλήθηκε από GitHub
γονέας 872846bcdc
υποβολή 0a1a419191
@@ -229,6 +229,24 @@ template <ExtModuleLaunchKernelSig* func> void ModuleLaunchKernelNegativeParamet
hipErrorInvalidValue);
}
SECTION("Stream not on the same device") {
int numDevices = 0;
HIP_CHECK(hipGetDeviceCount(&numDevices));
if (numDevices < 2) {
SUCCEED("skipped the testcase as number of devices is less than 2");
} else {
HIP_CHECK(hipSetDevice(1));
hipStream_t s1;
HIP_CHECK(hipStreamCreate(&s1));
HIP_CHECK(hipSetDevice(0));
hipFunction_t f = GetKernel(mg.module(), "Kernel42");
void* extra[0] = {};
HIP_CHECK_ERROR(func(f, 1, 1, 1, 1, 1, 1, 0, s1, nullptr, extra, nullptr, nullptr, 0u),
hipErrorInvalidResourceHandle);
HIP_CHECK(hipStreamDestroy(s1));
}
}
SECTION("Invalid extra") {
hipFunction_t f = GetKernel(mg.module(), "Kernel42");
void* extra[0] = {};