P4 to Git Change 2024251 by kjayapra@0_HIPWS_LNX1_ROCM on 2019/11/04 10:07:42

SWDEV-206759 - Adding support for duplicate global vars

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#45 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#81 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#46 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#48 edit
... //depot/stg/opencl/drivers/opencl/make/hip.git/tests/build/Makefile.hip_tests#30 edit
This commit is contained in:
foreman
2019-11-04 10:13:20 -05:00
parent 819b29f92d
commit 33038437b3
4 changed files with 96 additions and 43 deletions
+8 -8
View File
@@ -587,8 +587,8 @@ hipError_t hipMemcpyToSymbol(const void* symbolName, const void* src, size_t cou
hipDeviceptr_t device_ptr = nullptr;
/* Get address and size for the global symbol */
if (!PlatformState::instance().getGlobalVar(symbolName, ihipGetDevice(), &device_ptr,
&sym_size)) {
if (!PlatformState::instance().getGlobalVar(symbolName, ihipGetDevice(), nullptr,
&device_ptr, &sym_size)) {
HIP_RETURN(hipErrorInvalidSymbol);
}
@@ -611,8 +611,8 @@ hipError_t hipMemcpyFromSymbol(void* dst, const void* symbolName, size_t count,
hipDeviceptr_t device_ptr = nullptr;
/* Get address and size for the global symbol */
if (!PlatformState::instance().getGlobalVar(symbolName, ihipGetDevice(), &device_ptr,
&sym_size)) {
if (!PlatformState::instance().getGlobalVar(symbolName, ihipGetDevice(), nullptr,
&device_ptr, &sym_size)) {
HIP_RETURN(hipErrorInvalidSymbol);
}
@@ -635,8 +635,8 @@ hipError_t hipMemcpyToSymbolAsync(const void* symbolName, const void* src, size_
hipDeviceptr_t device_ptr = nullptr;
/* Get address and size for the global symbol */
if (!PlatformState::instance().getGlobalVar(symbolName, ihipGetDevice(), &device_ptr,
&sym_size)) {
if (!PlatformState::instance().getGlobalVar(symbolName, ihipGetDevice(), nullptr,
&device_ptr, &sym_size)) {
HIP_RETURN(hipErrorInvalidSymbol);
}
@@ -659,8 +659,8 @@ hipError_t hipMemcpyFromSymbolAsync(void* dst, const void* symbolName, size_t co
hipDeviceptr_t device_ptr = nullptr;
/* Get address and size for the global symbol */
if (!PlatformState::instance().getGlobalVar(symbolName, ihipGetDevice(), &device_ptr,
&sym_size)) {
if (!PlatformState::instance().getGlobalVar(symbolName, ihipGetDevice(), nullptr,
&device_ptr, &sym_size)) {
HIP_RETURN(hipErrorInvalidSymbol);
}