From bec936b08bf405226720038c00d8fd01d095ae35 Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 4 Mar 2015 18:02:32 -0500 Subject: [PATCH] P4 to Git Change 1127440 by weizhang@weizhang-lnx-opencl on 2015/03/04 13:56:00 EPR #413960 - Platform Atomics on CZ. 1. Since CMMQS can support 4G atomics range on CZ, the atomics range on KV is reverted to 4G. 2. On KV, the platform atomics is implemented by using ATC/IOMMU. But on CZ, it should be implemented without using ATC/IOMMU due to HW changes. So, _svmAtomicsUsingIOMMU is introduced to differentiate the two implementations. 3. _priSupport was renamed _svmAtomics due to different implementation on KV vs CZ. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#304 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/include/cal/cal.h#33 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#109 edit --- rocclr/runtime/device/gpu/gpusettings.cpp | 2 +- rocclr/runtime/device/gpu/gslbe/src/include/cal/cal.h | 2 +- rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rocclr/runtime/device/gpu/gpusettings.cpp b/rocclr/runtime/device/gpu/gpusettings.cpp index 7e6e6341b9..ae965c01f5 100644 --- a/rocclr/runtime/device/gpu/gpusettings.cpp +++ b/rocclr/runtime/device/gpu/gpusettings.cpp @@ -419,7 +419,7 @@ Settings::create( svmFineGrainSystem_ = calAttr.isSVMFineGrainSystem; - svmAtomics_ = (calAttr.priSupport || calAttr.isSVMFineGrainSystem) ? true : false; + svmAtomics_ = (calAttr.svmAtomics || calAttr.isSVMFineGrainSystem) ? true : false; // Enable some platform extensions enableExtension(ClAmdDeviceAttributeQuery); diff --git a/rocclr/runtime/device/gpu/gslbe/src/include/cal/cal.h b/rocclr/runtime/device/gpu/gslbe/src/include/cal/cal.h index 1e800fae6e..f7282e3906 100644 --- a/rocclr/runtime/device/gpu/gslbe/src/include/cal/cal.h +++ b/rocclr/runtime/device/gpu/gslbe/src/include/cal/cal.h @@ -234,7 +234,7 @@ typedef struct CALdeviceattribsRec { CALuint counterFreq; /**< Ref clock counter frequency */ double nanoSecondsPerTick; /**< Nano seconds per GPU tick */ bool longIdleDetect; /**< Whether LongIdleDetect enabled */ - bool priSupport; /**< IOMMUv2 ATS/PRI support */ + bool svmAtomics; /**< check if svm atomics support */ CALuint64 vaStart; /**< VA start address */ CALuint64 vaEnd; /**< VA end address */ bool isWorkstation; /**< Whether Device is a Workstation/Server part */ diff --git a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp index eaaf88937e..fbe5342e65 100644 --- a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp +++ b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp @@ -150,7 +150,7 @@ CALGSLDevice::getAttribs_int(gsl::gsCtx* cs) m_attribs.counterFreq = cs->getCounterFreq(); m_attribs.nanoSecondsPerTick = 1000000000.0 / cs->getCounterFreq(); m_attribs.longIdleDetect = cs->getLongIdleDetect(); - m_attribs.priSupport = m_adp->pAsicInfo->priSupport; + m_attribs.svmAtomics = m_adp->pAsicInfo->svmAtomics; m_attribs.vaStart = static_cast(m_adp->pAsicInfo->vaStart); m_attribs.vaEnd = static_cast(m_adp->pAsicInfo->vaEnd);