SWDEV-491253 - Create stream capture test for kernel APIs (#1189)

Этот коммит содержится в:
vstojilj authored and GitHub committed 2025-11-27 17:40:11 +01:00
1 родитель 1c09c87cc7
Коммит 259010f2d5
6 files changed
+108 -9

No files matched your search

+33
Просмотреть файл
@@ -213,6 +213,39 @@ TEST_CASE("Unit_hipModuleLaunchCooperativeKernel_Negative_Parameters") {
#endif
}
/**
* Test Description
* ------------------------
* - Test `hipModuleLaunchCooperativeKernel` when it is captured.
* Test source
* ------------------------
* - unit/module/hipModuleLaunchCooperativeKernel.cc
* Test requirements
* ------------------------
* - HIP_VERSION >= 5.5
*/
TEST_CASE("Unit_hipModuleLaunchCooperativeKernel_Verify_Capture") {
if (!DeviceAttributesSupport(0, hipDeviceAttributeCooperativeLaunch)) {
HipTest::HIP_SKIP_TEST("CooperativeLaunch not supported");
return;
}
auto mg = ModuleGuard::InitModule("launch_kernel_module.code");
hipStream_t stream;
HIP_CHECK(hipStreamCreate(&stream));
GENERATE_CAPTURE();
BEGIN_CAPTURE(stream);
hipFunction_t f = GetKernel(mg.module(), "CoopKernel");
HIP_CHECK(hipModuleLaunchCooperativeKernel(f, 2, 2, 1, 1, 1, 1, 0, stream, nullptr));
END_CAPTURE(stream);
HIP_CHECK(hipDeviceSynchronize());
HIP_CHECK(hipStreamDestroy(stream));
}
/**
* End doxygen group ModuleTest.
* @}