mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
fix: ocloc - add bindless mode options if bindless is enabled
If release helper is not present, do not add bindless mode options. Related-To: NEO-7063 Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
570039e5e5
commit
78bd3da078
@@ -1136,6 +1136,10 @@ void OfflineCompiler::appendExtraInternalOptions(std::string &internalOptions) {
|
||||
if (compilerProductHelper->isForceEmuInt32DivRemSPRequired()) {
|
||||
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::forceEmuInt32DivRemSP);
|
||||
}
|
||||
if (!compilerProductHelper->isBindlessAddressingDisabled(releaseHelper.get())) {
|
||||
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::bindlessMode);
|
||||
}
|
||||
|
||||
CompilerOptions::concatenateAppend(internalOptions, compilerProductHelper->getCachingPolicyOptions(false));
|
||||
CompilerOptions::applyExtraInternalOptions(internalOptions, *compilerProductHelper);
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ class CompilerProductHelper {
|
||||
virtual void getKernelFp32AtomicCapabilities(uint32_t &fp32Caps) const = 0;
|
||||
virtual void getKernelFp64AtomicCapabilities(uint32_t &fp64Caps) const = 0;
|
||||
virtual void getKernelCapabilitiesExtra(const ReleaseHelper *releaseHelper, uint32_t &extraCaps) const = 0;
|
||||
virtual bool isBindlessAddressingDisabled(const ReleaseHelper *releaseHelper) const = 0;
|
||||
|
||||
virtual ~CompilerProductHelper() = default;
|
||||
uint32_t getHwIpVersion(const HardwareInfo &hwInfo) const;
|
||||
@@ -131,6 +132,7 @@ class CompilerProductHelperHw : public CompilerProductHelper {
|
||||
void getKernelFp32AtomicCapabilities(uint32_t &fp32Caps) const override;
|
||||
void getKernelFp64AtomicCapabilities(uint32_t &fp64Caps) const override;
|
||||
void getKernelCapabilitiesExtra(const ReleaseHelper *releaseHelper, uint32_t &extraCaps) const override;
|
||||
bool isBindlessAddressingDisabled(const ReleaseHelper *releaseHelper) const override;
|
||||
|
||||
~CompilerProductHelperHw() override = default;
|
||||
|
||||
|
||||
@@ -304,4 +304,12 @@ void CompilerProductHelperHw<gfxProduct>::getKernelCapabilitiesExtra(const Relea
|
||||
extraCaps |= releaseHelper->getAdditionalExtraCaps();
|
||||
}
|
||||
}
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool CompilerProductHelperHw<gfxProduct>::isBindlessAddressingDisabled(const ReleaseHelper *releaseHelper) const {
|
||||
if (releaseHelper) {
|
||||
return releaseHelper->isBindlessAddressingDisabled();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -201,6 +201,25 @@ HWTEST2_F(CompilerProductHelperFixture, GivenReleaseHelperThenSplitMatrixMultipl
|
||||
EXPECT_FALSE(compilerProductHelper.isSplitMatrixMultiplyAccumulateSupported(releaseHelper));
|
||||
}
|
||||
|
||||
HWTEST2_F(CompilerProductHelperFixture, GivenReleaseHelperThenBindlessAddressingIsSupportedBasedOnReleaseHelper, IsNotXeHpcCore) {
|
||||
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
|
||||
auto releaseHelper = pDevice->getReleaseHelper();
|
||||
|
||||
if (releaseHelper) {
|
||||
|
||||
EXPECT_EQ(releaseHelper->isBindlessAddressingDisabled(), compilerProductHelper.isBindlessAddressingDisabled(releaseHelper));
|
||||
} else {
|
||||
EXPECT_TRUE(compilerProductHelper.isBindlessAddressingDisabled(releaseHelper));
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST2_F(CompilerProductHelperFixture, GivenReleaseHelperThenBindlessAddressingIsNotSupported, IsXeHpcCore) {
|
||||
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
|
||||
auto releaseHelper = pDevice->getReleaseHelper();
|
||||
|
||||
EXPECT_TRUE(compilerProductHelper.isBindlessAddressingDisabled(releaseHelper));
|
||||
}
|
||||
|
||||
HWTEST2_F(CompilerProductHelperFixture, givenAotConfigWhenSetHwInfoRevisionIdThenCorrectValueIsSet, IsAtMostDg2) {
|
||||
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
|
||||
Reference in New Issue
Block a user