P4 to Git Change 1522211 by lmoriche@lmoriche_opencl_dev2 on 2018/03/02 17:41:47

SWDEV-145570 - [HIP] - Hip Rearchitecture
	- Rename cuda* launch functions -> hip*
	- Add more function prototypes to compile the HIP tests

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_context.cpp#2 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_device.cpp#3 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.def.in#2 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.map.in#2 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#4 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#2 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#2 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_stream.cpp#1 add
Этот коммит содержится в:
foreman
2018-03-02 17:55:48 -05:00
родитель 13f4e897fc
Коммит f27e6709eb
8 изменённых файлов: 199 добавлений и 26 удалений
+7 -7
Просмотреть файл
@@ -54,7 +54,7 @@ struct __CudaPartHeader{
unsigned int subarch;
};
extern "C" hipModule_t __cudaRegisterFatBinary(void* bundle)
extern "C" hipModule_t __hipRegisterFatBinary(void* bundle)
{
if (!amd::Runtime::initialized()) { // FIXME: fix initialization
hipInit(0);
@@ -96,7 +96,7 @@ extern "C" hipModule_t __cudaRegisterFatBinary(void* bundle)
std::map<const void*, hipFunction_t> g_functions;
extern "C" void __cudaRegisterFunction(
extern "C" void __hipRegisterFunction(
hipModule_t module,
const void* hostFunction,
char* deviceFunction,
@@ -120,7 +120,7 @@ extern "C" void __cudaRegisterFunction(
g_functions.insert(std::make_pair(hostFunction, reinterpret_cast<hipFunction_t>(as_cl(kernel))));
}
extern "C" void __cudaRegisterVar(
extern "C" void __hipRegisterVar(
hipModule_t module,
char* hostVar,
char* deviceVar,
@@ -132,7 +132,7 @@ extern "C" void __cudaRegisterVar(
{
}
extern "C" void __cudaUnregisterFatBinary(
extern "C" void __hipUnregisterFatBinary(
hipModule_t module
)
{
@@ -143,7 +143,7 @@ dim3 g_blockDim; // FIXME: place in execution stack
size_t g_sharedMem; // FIXME: place in execution stack
hipStream_t g_stream; // FIXME: place in execution stack
extern "C" hipError_t cudaConfigureCall(
extern "C" hipError_t hipConfigureCall(
dim3 gridDim,
dim3 blockDim,
size_t sharedMem,
@@ -161,7 +161,7 @@ extern "C" hipError_t cudaConfigureCall(
char* g_arguments[1024]; // FIXME: needs to grow
extern "C" hipError_t cudaSetupArgument(
extern "C" hipError_t hipSetupArgument(
const void *arg,
size_t size,
size_t offset)
@@ -172,7 +172,7 @@ extern "C" hipError_t cudaSetupArgument(
return hipSuccess;
}
extern "C" hipError_t cudaLaunch(const void *hostFunction)
extern "C" hipError_t hipLaunchByPtr(const void *hostFunction)
{
std::map<const void*, hipFunction_t>::iterator it;
if ((it = g_functions.find(hostFunction)) == g_functions.end())