SWDEV-534394 - Kernel launch stream check (#533)

hipErrorInvalidResourceHandle is returned if stream is not on the launching device

[ROCm/clr commit: 7e777d3755]
这个提交包含在:
Xie, Pengda
2025-08-05 10:39:37 -07:00
提交者 GitHub
父节点 b7d8cb56d1
当前提交 213623506f
共修改 2 个文件,包含 6 行新增和 3 行删除
+3
查看文件
@@ -429,6 +429,9 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f, amd::LaunchParams& launch_par
uint64_t prevGridSum = 0, uint64_t allGridSum = 0,
uint32_t firstDevice = 0) {
int deviceId = hip::Stream::DeviceId(hStream);
if (deviceId != ihipGetDevice()) {
return hipErrorInvalidResourceHandle;
}
HIP_RETURN_ONFAIL(PlatformState::instance().initStatManagedVarDevicePtr(deviceId));
if (f == nullptr) {