P4 to Git Change 1095130 by xcui@merged_opencl_jxcwin on 2014/11/07 18:09:55

EPR #408459 - changed the implementation of svmAlloc, so that the first device can create amd::Memory object, and the rest of devices only added gpu memory to it. This is part of changes for mgpu support for svmalloc
	code review:
	http://ocltc.amd.com/reviews/r/6245/
	precheckin testing results:
	http://ocltc.amd.com:8111/viewModification.html?modId=43136&personal=true&buildTypeId=&tab=vcsModificationTests

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.hpp#88 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#233 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#479 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#133 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsadevice.cpp#87 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsadevice.hpp#44 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.cpp#19 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.hpp#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/context.cpp#34 edit
Tento commit je obsažen v:
foreman
2014-11-07 18:20:08 -05:00
rodič c24b46e708
revize efbedb25be
7 změnil soubory, kde provedl 35 přidání a 28 odebrání
+1 -1
Zobrazit soubor
@@ -884,7 +884,7 @@ Device::hostFree(void* ptr, size_t size) const
}
void*
Device::svmAlloc(amd::Context& context, size_t size, size_t alignment, cl_svm_mem_flags flags) const
Device::svmAlloc(amd::Context& context, size_t size, size_t alignment, cl_svm_mem_flags flags, void* svmPtr) const
{
bool atomics = (flags & CL_MEM_SVM_ATOMICS) != 0;
return hostAlloc(size, alignment, atomics);
+3 -2
Zobrazit soubor
@@ -149,7 +149,8 @@ public:
amd::Context& context, //!< The context used to create a buffer
size_t size, //!< size of svm spaces
size_t alignment, //!< alignment requirement of svm spaces
cl_svm_mem_flags flags //!< flags of creation svm spaces
cl_svm_mem_flags flags, //!< flags of creation svm spaces
void* svmPtr //!< existing svm pointer for mGPU case
) const {
ShouldNotReachHere();
return NULL;
@@ -333,7 +334,7 @@ public:
virtual void hostFree(void* ptr, size_t size = 0) const;
virtual void* svmAlloc(amd::Context& context, size_t size, size_t alignment, cl_svm_mem_flags flags = CL_MEM_READ_WRITE) const;
virtual void* svmAlloc(amd::Context& context, size_t size, size_t alignment, cl_svm_mem_flags flags = CL_MEM_READ_WRITE, void* svmPtr = NULL) const;
virtual void svmFree(void* ptr) const;