From 9423b93fb21b26d4f9dad691ca3b1a9ed116c2ee Mon Sep 17 00:00:00 2001 From: foreman Date: Mon, 15 Jun 2015 18:01:55 -0400 Subject: [PATCH] P4 to Git Change 1161661 by skudchad@skudchad_test_win_opencl2 on 2015/06/15 17:50:19 EPR #420701 - WDDM 2.0 - Indicate lite initialization via a new parameter initLite. This is needed as OCL\OGL can query devices first and lot of setup in IOL may not be really needed. On Win10, we create paging\fences for sync which dont get destroyed by the OS unless process is killed. This may prevent slave GPU powerdown in PX cases. - Disable WriteFence for OpenCL for now. ReviewBoardURL = http://ocltc.amd.com/reviews/r/7765/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp#72 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#122 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.h#48 edit --- .../runtime/device/gpu/gslbe/src/rt/GSLContext.cpp | 2 +- .../runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp | 14 +++++++------- rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp index 0c391407e1..2b81b6bd9e 100644 --- a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp +++ b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp @@ -109,7 +109,7 @@ CALGSLContext::open( } else { - m_cs = native->createComputeContext(mainEngineOrdinal, sdmaOrdinal); + m_cs = native->createComputeContext(mainEngineOrdinal, sdmaOrdinal, false); } if (m_cs == 0) diff --git a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp index c62312ccda..5f12542de2 100644 --- a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp +++ b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp @@ -380,7 +380,7 @@ void CALGSLDevice::PerformAdapterInitialization() const { CALGSLDevice* mutable_this = const_cast(this); - mutable_this->PerformAdapterInitialization_int(); + mutable_this->PerformAdapterInitialization_int(false); } void @@ -396,7 +396,7 @@ CALGSLDevice::PerformFullInitialization() const bool CALGSLDevice::SetupAdapter(int32 &asic_id) { - PerformAdapterInitialization(); + PerformAdapterInitialization_int(true); if (m_adp == 0) { @@ -465,7 +465,7 @@ bool CALGSLDevice::SetupContext(int32 &asic_id) { gsl::gsCtx* temp_cs = m_adp->createComputeContext(m_computeRing ? (m_isComputeRingIDForced ? m_forcedComputeEngineID : GSL_ENGINEID_COMPUTE0) - : GSL_ENGINEID_3DCOMPUTE0, m_canDMA ? GSL_ENGINEID_DRMDMA0 : GSL_ENGINEID_INVALID); + : GSL_ENGINEID_3DCOMPUTE0, m_canDMA ? GSL_ENGINEID_DRMDMA0 : GSL_ENGINEID_INVALID, true); temp_cs->getMainSubCtx()->setVPUMask(m_vpuMask); m_revision = temp_cs->getChipRev(); @@ -626,13 +626,13 @@ CALGSLDevice::SetupContext(int32 &asic_id) } void -CALGSLDevice::PerformAdapterInitialization_int() +CALGSLDevice::PerformAdapterInitialization_int(bool initLite) { if (m_adp == 0) { if (m_usePerVPUAdapterModel) { - m_adp = gsAdaptor::openAdaptorByIndex(m_gpuIndex, &m_scfg, &m_dcfg); + m_adp = gsAdaptor::openAdaptorByIndex(m_gpuIndex, &m_scfg, &m_dcfg, initLite); } else { @@ -648,13 +648,13 @@ CALGSLDevice::PerformFullInitialization_int() { if (m_adp == 0) { - PerformAdapterInitialization_int(); + PerformAdapterInitialization_int(false); } if (m_cs == 0) { m_cs = m_adp->createComputeContext(m_computeRing ? (m_isComputeRingIDForced ? m_forcedComputeEngineID : GSL_ENGINEID_COMPUTE0) - : GSL_ENGINEID_3DCOMPUTE0, m_canDMA ? GSL_ENGINEID_DRMDMA0 : GSL_ENGINEID_INVALID); + : GSL_ENGINEID_3DCOMPUTE0, m_canDMA ? GSL_ENGINEID_DRMDMA0 : GSL_ENGINEID_INVALID, false); m_cs->getMainSubCtx()->setVPUMask(m_vpuMask); // diff --git a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.h b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.h index 7aa1120cf4..c61dc0ce76 100644 --- a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.h +++ b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.h @@ -203,7 +203,7 @@ private: bool SetupAdapter(int32 &asic_id); bool SetupContext(int32 &asic_id); - void PerformAdapterInitialization_int(); + void PerformAdapterInitialization_int(bool initLite); void PerformFullInitialization_int(); void getAttribs_int(gsl::gsCtx* cs);