mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 16:24:18 +08:00
feature: enable bindless mode in ocloc in L0 on dg2
Before this PR, bindless build option isn't enabled in ocloc by default on dg2. So aot built program still use bindful kernel. This PR appends bindless option to ocloc according on releaseHelper config. Related-To: NEO-7063 Signed-off-by: He, Wenju <wenju.he@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1a364f5c98
commit
c35b13ccae
@@ -27,3 +27,14 @@ RKLTEST_F(MockOfflineCompilerRklTests, givenRklWhenAppendExtraInternalOptionsThe
|
||||
size_t found = internalOptions.find(NEO::CompilerOptions::forceEmuInt32DivRemSP.data());
|
||||
EXPECT_NE(std::string::npos, found);
|
||||
}
|
||||
|
||||
RKLTEST_F(MockOfflineCompilerRklTests, givenRklWhenAppendExtraInternalOptionsThenBindlessModeNotApplied) {
|
||||
|
||||
MockOfflineCompiler mockOfflineCompiler;
|
||||
mockOfflineCompiler.deviceName = "rkl";
|
||||
mockOfflineCompiler.initHardwareInfo(mockOfflineCompiler.deviceName);
|
||||
std::string internalOptions = mockOfflineCompiler.internalOptions;
|
||||
mockOfflineCompiler.appendExtraInternalOptions(internalOptions);
|
||||
size_t found = internalOptions.find(NEO::CompilerOptions::bindlessMode.data());
|
||||
EXPECT_EQ(std::string::npos, found);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/compiler_interface/compiler_options.h"
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
@@ -159,4 +160,21 @@ DG2TEST_F(Dg2OfflineCompilerTests, givenDg2DeprecatedAcronymAndInvalisRevisionId
|
||||
EXPECT_EQ(mockOfflineCompiler.hwInfo.ipVersion.value, AOT::DG2_G10_A0);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
DG2TEST_F(Dg2OfflineCompilerTests, givenDg2WhenAppendExtraInternalOptionsThenBindlessModeApplied) {
|
||||
MockOfflineCompiler mockOfflineCompiler;
|
||||
mockOfflineCompiler.argHelper->getPrinterRef().setSuppressMessages(true);
|
||||
std::string deviceStr;
|
||||
auto deviceID = dg2G10DeviceIds.front();
|
||||
|
||||
std::stringstream deviceIDStr, expectedOutput;
|
||||
mockOfflineCompiler.revisionId = AOT::DG2_G10_A0;
|
||||
deviceIDStr << "0x" << std::hex << deviceID;
|
||||
|
||||
mockOfflineCompiler.initHardwareInfo(deviceIDStr.str());
|
||||
|
||||
std::string internalOptions = mockOfflineCompiler.internalOptions;
|
||||
mockOfflineCompiler.appendExtraInternalOptions(internalOptions);
|
||||
EXPECT_NE(std::string::npos, internalOptions.find(CompilerOptions::bindlessMode.data()));
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -899,6 +899,9 @@ void OfflineCompiler::appendExtraInternalOptions(std::string &internalOptions) {
|
||||
}
|
||||
CompilerOptions::concatenateAppend(internalOptions, compilerProductHelper->getCachingPolicyOptions(false));
|
||||
CompilerOptions::applyExtraInternalOptions(internalOptions, *compilerProductHelper);
|
||||
if (releaseHelper && !releaseHelper->isBindlessAddressingDisabled()) {
|
||||
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::bindlessMode.str());
|
||||
}
|
||||
}
|
||||
|
||||
void OfflineCompiler::parseDebugSettings() {
|
||||
|
||||
Reference in New Issue
Block a user