From 5981bd5c221b27fa78b056bc0477b4593e8f0b4e Mon Sep 17 00:00:00 2001 From: Jaydeep Patel Date: Tue, 31 Jan 2023 13:22:22 +0000 Subject: [PATCH] SWDEV-379395 - Use getQueue as it handles null stream and flags can be combination. Change-Id: If37854a9fc0fc57acb30e652953a7f283831cad8 [ROCm/clr commit: 01c32994256428d59f86965ef6b60e0c4c8fbf6a] --- projects/clr/hipamd/src/hip_module.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/clr/hipamd/src/hip_module.cpp b/projects/clr/hipamd/src/hip_module.cpp index f3ae26113f..ae5d2660f0 100644 --- a/projects/clr/hipamd/src/hip_module.cpp +++ b/projects/clr/hipamd/src/hip_module.cpp @@ -516,7 +516,8 @@ hipError_t ihipModuleLaunchCooperativeKernelMultiDevice(hipFunctionLaunchParams* return hipErrorInvalidValue; } - if ((flags < 0) || (flags > hipCooperativeLaunchMultiDeviceNoPostSync)) { + if (flags > (hipCooperativeLaunchMultiDeviceNoPostSync + + hipCooperativeLaunchMultiDeviceNoPreSync)) { return hipErrorInvalidValue; } @@ -730,7 +731,7 @@ hipError_t ihipLaunchCooperativeKernelMultiDevice(hipLaunchParams* launchParamsL return hipErrorInvalidValue; } - amd::HostQueue* queue = reinterpret_cast(launch.stream)->asHostQueue(); + amd::HostQueue* queue = hip::getQueue(launch.stream); hipFunction_t func = nullptr; // The order of devices in the launch may not match the order in the global array for (size_t dev = 0; dev < g_devices.size(); ++dev) {