P4 to Git Change 1497365 by gandryey@gera-w8 on 2017/12/21 11:59:26

SWDEV-79445 - OCL generic changes and code clean-up
	- Make sure PAL works under HSAIL compiler. Use targets switch between LC and HSAIL, until HSAIL implements the new targets.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldefs.hpp#29 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/macros.hpp#9 edit
This commit is contained in:
foreman
2017-12-21 12:06:35 -05:00
szülő 013d49e0a6
commit edd0c50de2
2 fájl változott, egészen pontosan 11 új sor hozzáadva és 7 régi sor törölve
@@ -140,19 +140,20 @@ static const AMDDeviceInfo DeviceInfo[] = {
/* Bristol */ {"Bristol Ridge", "carrizo", 4, 16, 1, 256, 64 * Ki, 32, 801},
/* Stoney */ {"Stoney", "stoney", 4, 16, 1, 256, 64 * Ki, 32, 810},
/* Iceland */ {"Iceland", "iceland", 4, 16, 1, 256, 64 * Ki, 32, 802},
/* Tonga */ {"Tonga", "tonga", 4, 16, 1, 256, 64 * Ki, 32, 802},
/* Fiji */ {"Fiji", "fiji", 4, 16, 1, 256, 64 * Ki, 32, 803},
/* Ellesmere */ {"Ellesmere", "ellesmere", 4, 16, 1, 256, 64 * Ki, 32, 803},
/* Baffin */ {"Baffin", "baffin", 4, 16, 1, 256, 64 * Ki, 32, 803},
/* Lexa */ {"gfx803", "gfx803", 4, 16, 1, 256, 64 * Ki, 32, 803},
/* Iceland */ {"Iceland", "iceland", 4, 16, 1, 256, 64 * Ki, 32, LIGHTNING_SWITCH(802, 800)},
/* Tonga */ {"Tonga", "tonga", 4, 16, 1, 256, 64 * Ki, 32, LIGHTNING_SWITCH(802, 800)},
/* Fiji */ {"Fiji", "fiji", 4, 16, 1, 256, 64 * Ki, 32, LIGHTNING_SWITCH(803, 804)},
/* Ellesmere */ {"Ellesmere", "ellesmere", 4, 16, 1, 256, 64 * Ki, 32, LIGHTNING_SWITCH(803, 804)},
/* Baffin */ {"Baffin", "baffin", 4, 16, 1, 256, 64 * Ki, 32, LIGHTNING_SWITCH(803, 804)},
/* Lexa */ {"gfx803", "gfx803", 4, 16, 1, 256, 64 * Ki, 32, LIGHTNING_SWITCH(803, 804)},
};
// Ordering as per AsicRevision# in //depot/stg/pal/inc/core/palDevice.h and
// http://confluence.amd.com/pages/viewpage.action?spaceKey=ASLC&title=AMDGPU+Target+Names
static const AMDDeviceInfo Gfx9PlusSubDeviceInfo[] = {
/* Vega10 */{"gfx900", "gfx900", 4, 16, 1, 256, 64 * Ki, 32, 900},
/* Vega10 XNACK */{"gfx901", "gfx901", 4, 16, 1, 256, 64 * Ki, 32, 901},
/* Vega10 XNACK */{ LIGHTNING_SWITCH("gfx900","gfx901"), LIGHTNING_SWITCH("gfx900","gfx901"),
4, 16, 1, 256, 64 * Ki, 32, LIGHTNING_SWITCH(900, 901)},
/* Vega12 */{"gfx904", "gfx904", 4, 16, 1, 256, 64 * Ki, 32, 904},
/* Vega12 XNACK */{"gfx905", "gfx905", 4, 16, 1, 256, 64 * Ki, 32, 905},
/* Vega20 */{ "", "", 4, 16, 1, 256, 64 * Ki, 32, 906},
@@ -100,9 +100,11 @@
#ifdef WITH_LIGHTNING_COMPILER
#define LIGHTNING_ONLY(x) x
#define NOT_LIGHTNING(x)
#define IS_LIGHTNING true
#else /* !WITH_LIGHTNING_COMPILER */
#define LIGHTNING_ONLY(x)
#define NOT_LIGHTNING(x) x
#endif /* !WITH_LIGHTNING_COMPILER */
#ifndef IS_LINUX
@@ -127,6 +129,7 @@
#define IF_RIGHT(cond, x) IF_RIGHT_##cond(x)
#define IF(cond, x, y) IF_LEFT(cond, x) IF_RIGHT(cond, y)
#define LIGHTNING_SWITCH(x, other) LIGHTNING_ONLY(x) NOT_LIGHTNING(other)
#define LINUX_SWITCH(x, other) LINUX_ONLY(x) NOT_LINUX(other)
#define MACOS_SWITCH(x, other) MACOS_ONLY(x) NOT_MACOS(other)
#define WINDOWS_SWITCH(x, other) WINDOWS_ONLY(x) NOT_WINDOWS(other)