P2PStating buffer allocation when P2P is not enabled between all GPUs

SWDEV-232580 & SWDEV-232580
Allocate p2p statging buffer when full P2P access is not available between all devices.
p2p staging buffer will eventually be used when required.

Change-Id: If8490ba7b1c52c432c1e942ae95421b9d2ec7097
Este commit está contenido en:
agodavar authored and Anusha Godavarthy Surya committed 2020-04-28 07:10:57 -04:00
1 padre 27bfd2a3ee
commit f149fe0803
1 file changed
+1 -1
+1 -1
Ver fichero
@@ -734,7 +734,7 @@ bool Device::create(bool sramEccEnabled) {
return false;
}
if ((p2p_agents_.size() == 0) && (devices.size() > 1)) {
if ((p2p_agents_.size() < (devices.size()-1)) && (devices.size() > 1)) {
amd::Buffer* buf = new (GlbCtx()) amd::Buffer(GlbCtx(), CL_MEM_ALLOC_HOST_PTR, kP2PStagingSize);
if ((buf != nullptr) && buf->create()) {
p2p_stage_ = buf;