P4 to Git Change 1137201 by skudchad@skudchad_test_win_opencl2 on 2015/04/02 16:27:14
EPR #403782 - IOMMU2/SVM
- Enable SCOption_R1200_ENABLE_XNACK whenever IOMMUv2 is supported.
- Add "-sc-xnack-iommu" option for compile and link and pass this to SCWrapper in the options string.
ReviewBoardURL = http://ocltc.amd.com/reviews/r/7266/diff/
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/scwrapper/SI/scStateSI.cpp#30 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/OPTIONS.def#122 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#282 edit
[ROCm/clr commit: 05a3825964]
Этот коммит содержится в:
@@ -1105,6 +1105,14 @@ OPTION(OT_BOOL, \
|
||||
true, 0, 0, NULL, \
|
||||
"Use AMDAliasAnalysis for correct barrier behavior. If disabled, remove noalias to ensure correct barrier behavior.")
|
||||
|
||||
// -sc-xnack-iommu
|
||||
OPTION(OT_BOOL, \
|
||||
OA_RUNTIME|OVIS_SUPPORT|OVA_DISALLOWED|OFA_NORMAL, \
|
||||
"sc-xnack-iommu", NULL, \
|
||||
SCXnackIommu, \
|
||||
false, 0, 0, NULL, \
|
||||
"Enable SC XNACK workaround if IOMMUv2 is being used")
|
||||
|
||||
// -limit-vector-registers=<value> (default 0 = hardware specific)
|
||||
FLAG(OT_UINT32, OVIS_SUPPORT|OVIS_INTERNAL|OVA_REQUIRED, \
|
||||
"limit-vector-registers", OptLimitVecRegisters, 0, \
|
||||
|
||||
@@ -676,6 +676,12 @@ NullKernel::create(
|
||||
}
|
||||
|
||||
amd::option::Options* Opts = (amd::option::Options*)bin->options;
|
||||
|
||||
// Append an option so that we can selectively enable a SCOption on CZ
|
||||
// whenever IOMMUv2 is enabled.
|
||||
if (nullDev().settings().svmFineGrainSystem_) {
|
||||
options->origOptionStr.append(" -sc-xnack-iommu");
|
||||
}
|
||||
// temporary solution to synchronize buildNo between runtime and complib
|
||||
// until we move runtime inside complib
|
||||
Opts->setBuildNo(options->getBuildNo());
|
||||
@@ -3557,6 +3563,11 @@ HSAILKernel::init(bool finalize)
|
||||
std::string options(compileOptions_.c_str());
|
||||
options.append(" -just-kernel=");
|
||||
options.append(openClKernelName.c_str());
|
||||
// Append an option so that we can selectively enable a SCOption on CZ
|
||||
// whenever IOMMUv2 is enabled.
|
||||
if (dev().settings().svmFineGrainSystem_) {
|
||||
options.append(" -sc-xnack-iommu");
|
||||
}
|
||||
error = aclCompile(dev().hsaCompiler(), prog().binaryElf(),
|
||||
options.c_str(), ACL_TYPE_CG, ACL_TYPE_ISA, NULL);
|
||||
buildLog_ += aclGetCompilerLog(dev().hsaCompiler());
|
||||
|
||||
Ссылка в новой задаче
Block a user