P4 to Git Change 1321838 by smekhano@stas-mwamba-rocm-hsa on 2016/10/03 14:09:41

SWDEV-104316 - set correct target for ROCm/HSA
	Reviewed by Laurent Morichetti

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#21 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdefs.hpp#7 edit
Этот коммит содержится в:
foreman
2016-10-03 14:21:28 -04:00
родитель 109eabeca3
Коммит 9c5cfb0551
2 изменённых файлов: 12 добавлений и 14 удалений
+2 -5
Просмотреть файл
@@ -252,11 +252,8 @@ HSAILProgram::compileImpl(
acl_error errorCode;
aclTargetInfo target;
//Defaulting to bonaire
//Todo (sramalin) : Query the device for asic type-
//Defaulting to Bonair for now.
target = g_complibApi._aclGetTargetInfo(LP64_SWITCH("hsail","hsail64"), "Bonaire",
&errorCode);
target = g_complibApi._aclGetTargetInfo(LP64_SWITCH("hsail","hsail64"),
dev().deviceInfo().complibTarget_, &errorCode);
//end if asic info is ready
// We dump the source code for each program (param: headers)
+10 -9
Просмотреть файл
@@ -10,6 +10,7 @@ struct AMDDeviceInfo {
HsaDeviceId hsaDeviceId_; //!< Machine id
const char* targetName_; //!< Target name for compilation
const char* machineTarget_; //!< Machine target
const char* complibTarget_; //!< Compiler library target name
uint simdPerCU_; //!< Number of SIMDs per CU
uint simdWidth_; //!< Number of workitems processed per SIMD
uint simdInstructionWidth_; //!< Number of instructions processed per SIMD
@@ -34,15 +35,15 @@ const HsaDeviceId HSA_INVALID_DEVICE_ID = -1;
static const AMDDeviceInfo DeviceInfo[] = {
// targetName machineTarget
/* TARGET_KAVERI_SPECTRE */ {HSA_SPECTRE_ID, "", "kaveri", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
/* TARGET_KAVERI_SPOOKY */ {HSA_SPOOKY_ID, "", "kaveri", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
/* TARGET_TONGA */ {HSA_TONGA_ID, "", "tonga", 4, 16, 1, 256, 64 * Ki, 32, 0, 0},
/* TARGET_CARRIZO */ {HSA_CARRIZO_ID, "", "carrizo", 4, 16, 1, 256, 64 * Ki, 32, 0, 0},
/* TARGET_ICELAND */ {HSA_ICELAND_ID, "", "iceland", 4, 16, 1, 256, 64 * Ki, 32, 0, 0},
/* TARGET_FIJI */ {HSA_FIJI_ID, "", "fiji", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
/* TARGET HAWAII */ {HSA_HAWAII_ID, "", "hawaii", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
/* TARGET ELLESMERE */ {HSA_ELLESMERE_ID, "", "polaris10", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
/* TARGET BAFFIN */ {HSA_BAFFIN_ID, "", "polaris11", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 }
/* TARGET_KAVERI_SPECTRE */ {HSA_SPECTRE_ID, "", "kaveri", "Spectre", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
/* TARGET_KAVERI_SPOOKY */ {HSA_SPOOKY_ID, "", "kaveri", "Spooky", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
/* TARGET_TONGA */ {HSA_TONGA_ID, "", "tonga", "Tonga", 4, 16, 1, 256, 64 * Ki, 32, 0, 0},
/* TARGET_CARRIZO */ {HSA_CARRIZO_ID, "", "carrizo", "Carrizo", 4, 16, 1, 256, 64 * Ki, 32, 0, 0},
/* TARGET_ICELAND */ {HSA_ICELAND_ID, "", "iceland", "Iceland", 4, 16, 1, 256, 64 * Ki, 32, 0, 0},
/* TARGET_FIJI */ {HSA_FIJI_ID, "", "fiji", "Fiji", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
/* TARGET HAWAII */ {HSA_HAWAII_ID, "", "hawaii", "Hawaii", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
/* TARGET ELLESMERE */ {HSA_ELLESMERE_ID, "", "polaris10", "Ellesmere", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
/* TARGET BAFFIN */ {HSA_BAFFIN_ID, "", "polaris11", "Baffin", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 }
};
}