P4 to Git Change 1727059 by asalmanp@asalmanp-ocl-stg on 2019/01/07 17:48:44

SWDEV-132899 - [OCL][GFX10] report number of WGP by default on gfx10 ASICs
	Both HSAIL/SC and LC compilers use WGP mode by default on gfx10 ASICs (i.e., COMPUTE_PGM_RSRC1.WGP_MODE is set to 1 by both compilers) therefore runtime should report number of WGP (i.e., CU/2) on gfx10 ASICs by default.
	The new environment variable (GPU_ENABLE_WGP_MODE = 0)  can be used to force CU mode on LC (i.e., -mcumode option) if it’s needed (HSAIL/SC doesn't have any compiler option for forcing the CU mode)

	Also, using the new environment variable (GPU_ENABLE_WAVE32_MODE) to control the wave32 mode on gfx10+.

	ReviewRequestURL = http://ocltc.amd.com/reviews/r/16435/diff/

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#329 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#27 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#121 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#65 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#301 edit
This commit is contained in:
foreman
2019-01-07 18:02:10 -05:00
parent 612ea757c4
commit e631b3978f
5 changed files with 63 additions and 20 deletions
+13 -3
View File
@@ -140,6 +140,10 @@ Settings::Settings() {
maxCmdBuffers_ = 12;
useLightning_ = GPU_ENABLE_LC;
enableWgpMode_ = false;
enableWave32Mode_ = false;
hsailExplicitXnack_ = false;
lcWavefrontSize64_ = false;
}
bool Settings::create(const Pal::DeviceProperties& palProp,
@@ -185,7 +189,15 @@ bool Settings::create(const Pal::DeviceProperties& palProp,
case Pal::AsicRevision::Navi10:
case Pal::AsicRevision::Navi10Lite:
gfx10Plus_ = true;
// Fall through to AI (gfx9) ...
hsailExplicitXnack_ = static_cast<uint>(palProp.gpuMemoryProperties.flags.pageMigrationEnabled
|| palProp.gpuMemoryProperties.flags.iommuv2Support);
enableWgpMode_ = GPU_ENABLE_WGP_MODE || !useLightning_;
enableWave32Mode_ = GPU_ENABLE_WAVE32_MODE;
if (palProp.revision == Pal::AsicRevision::Navi10Lite && useLightning_) {
enableWave32Mode_ = false;
}
lcWavefrontSize64_ = !enableWave32Mode_;
// Fall through to AI (gfx9) ...
case Pal::AsicRevision::Vega20:
case Pal::AsicRevision::Vega12:
case Pal::AsicRevision::Vega10:
@@ -451,8 +463,6 @@ bool Settings::create(const Pal::DeviceProperties& palProp,
}
}
gfx10Hsail_ = gfx10Plus_;
// Override current device settings
override();