P4 to Git Change 1381244 by gandryey@gera-w8 on 2017/03/03 17:58:38

SWDEV-107546 - [ROCm CQE][OCL][LC/HSAIL][mGPU][G] WF conf test "Buffers" fails in mGPU configs
	- Add MGPU coherency layer support

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocblit.cpp#14 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocblit.hpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#42 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#17 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmemory.cpp#12 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmemory.hpp#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#32 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#125 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#99 edit


[ROCm/clr commit: 8a1b72640a]
Αυτή η υποβολή περιλαμβάνεται σε:
foreman committed 2017-03-03 18:02:55 -05:00
1 γονέας 1cb396361b
υποβολή b03a26d066
9 files changed
+542 -140

No files matched your search

@@ -125,6 +125,9 @@ Memory::Memory(
parent_->retain();
parent_->isParent_ = true;
if (parent.getHostMem() != nullptr) {
setHostMem(reinterpret_cast<address>(parent.getHostMem()) + origin);
}
// Inherit memory flags from the parent
if ((flags_ & (CL_MEM_READ_WRITE | CL_MEM_READ_ONLY |
CL_MEM_WRITE_ONLY)) == 0) {
@@ -407,7 +410,7 @@ Memory::~Memory()
// Release the parent.
if (NULL != parent_) {
// Update cache if runtime destroys a subbuffer
if (NULL != parent_->getHostMem()) {
if (NULL != parent_->getHostMem() && (vDev_ == NULL)) {
cacheWriteBack();
}
parent_->removeSubBuffer(this);
@@ -567,8 +570,9 @@ Pipe::initDeviceMemory()
Image::Image(
const Format& format,
Image& parent,
uint baseMipLevel)
: Memory(parent, 0, 0, parent.getWidth() * parent.getHeight() *
uint baseMipLevel,
cl_mem_flags flags)
: Memory(parent, flags, 0, parent.getWidth() * parent.getHeight() *
parent.getDepth() * format.getElementSize())
, impl_(format, Coord3D(parent.getWidth() *
parent.getImageFormat().getElementSize() /
@@ -1193,12 +1197,13 @@ Image::createView(
const Context& context,
const Format& format,
device::VirtualDevice* vDev,
uint baseMipLevel)
uint baseMipLevel,
cl_mem_flags flags)
{
Image* view = NULL;
// Find the image dimensions and create a corresponding object
view = new (context) Image(format, *this, baseMipLevel);
view = new (context) Image(format, *this, baseMipLevel, flags);
// Set GPU virtual device for this view
view->setVirtualDevice(vDev);
@@ -170,7 +170,7 @@ protected:
bool isParent_; //!< This object is a parent
device::VirtualDevice* vDev_; //!< Memory object belongs to a virtual device only
bool forceSysMemAlloc_; //!< Forces system memory allocation
std::atomic_uint mapCount_; //!< Keep track of number of mappings for a memory object
std::atomic_uint mapCount_; //!< Keep track of number of mappings for a memory object
void * svmHostAddress_; //!< svm host address;
bool svmPtrCommited_; //!< svm host address committed flag;
bool canBeCached_; //!< flag to if the object can be cached;
@@ -516,7 +516,8 @@ protected:
Image(
const Format& format,
Image& parent,
uint baseMipLevel = 0);
uint baseMipLevel = 0,
cl_mem_flags flags = 0);
///! Initializes the device memory array which is nested
// after'Image' object in memory layout.
@@ -593,7 +594,8 @@ public:
const Context& context, //!< Context for a view creation
const Format& format, //!< The new format for a view
device::VirtualDevice* vDev, //!< Virtual device object
uint baseMipLevel = 0 //!< Base mip level for a view
uint baseMipLevel = 0, //!< Base mip level for a view
cl_mem_flags flags = 0 //!< Memory allocation flags
);
//! Returns the impl for this image.