From 534727cd016badebaeae721854c8ec50c2318749 Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 27 Aug 2019 20:26:25 -0400
Subject: [PATCH] P4 to Git Change 1990032 by cpaquot@cpaquot-ocl-lc-lnx on
2019/08/27 20:20:36
SWDEV-145570 - [HIP] Add missing HIP_INIT_API macros and more debug printf.
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#39 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_stream.cpp#23 edit
---
hipamd/api/hip/hip_module.cpp | 4 ++++
hipamd/api/hip/hip_stream.cpp | 2 ++
2 files changed, 6 insertions(+)
diff --git a/hipamd/api/hip/hip_module.cpp b/hipamd/api/hip/hip_module.cpp
index 1f4a2defe9..c29fec995c 100644
--- a/hipamd/api/hip/hip_module.cpp
+++ b/hipamd/api/hip/hip_module.cpp
@@ -414,6 +414,8 @@ hipError_t ihipLaunchCooperativeKernelMultiDevice(hipLaunchParams* launchParamsL
hipError_t hipLaunchCooperativeKernelMultiDevice(hipLaunchParams* launchParamsList,
int numDevices, unsigned int flags)
{
+ HIP_INIT_API(launchParamsList, numDevices, flags);
+
return ihipLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags,
(amd::NDRangeKernelCommand::CooperativeGroups |
amd::NDRangeKernelCommand::CooperativeMultiDeviceGroups));
@@ -421,6 +423,8 @@ hipError_t hipLaunchCooperativeKernelMultiDevice(hipLaunchParams* launchParamsLi
hipError_t hipExtLaunchMultiKernelMultiDevice(hipLaunchParams* launchParamsList,
int numDevices, unsigned int flags) {
+ HIP_INIT_API(launchParamsList, numDevices, flags);
+
return ihipLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags, 0);
}
diff --git a/hipamd/api/hip/hip_stream.cpp b/hipamd/api/hip/hip_stream.cpp
index 5dfe6f2db0..bc681d8a7e 100644
--- a/hipamd/api/hip/hip_stream.cpp
+++ b/hipamd/api/hip/hip_stream.cpp
@@ -114,6 +114,8 @@ static hipError_t ihipStreamCreate(hipStream_t *stream, unsigned int flags, amd:
*stream = reinterpret_cast(hStream);
+ LogPrintfInfo("ihipStreamCreate: %zx", hStream);
+
return hipSuccess;
}