performance: enable timestamp caching on OCL

Related-To: NEO-14360

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2025-11-03 07:45:40 +00:00
committed by Compute-Runtime-Automation
parent ba28f2c660
commit 88d379f5e5
2 changed files with 13 additions and 2 deletions

View File

@@ -59,7 +59,7 @@ bool ProductHelperHw<gfxProduct>::isNonCoherentTimestampsModeEnabled() const {
if (debugManager.flags.ForceNonCoherentModeForTimestamps.get() != -1) {
return debugManager.flags.ForceNonCoherentModeForTimestamps.get();
}
return !this->isDcFlushAllowed();
return !this->isDcFlushAllowed() || (ApiSpecificConfig::OCL == ApiSpecificConfig::getApiType());
}
template <PRODUCT_FAMILY gfxProduct>

View File

@@ -5,6 +5,7 @@
*
*/
#include "shared/source/helpers/api_specific_config.h"
#include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/helpers/register_offsets.h"
#include "shared/test/common/cmd_parse/hw_parse.h"
@@ -17,6 +18,9 @@
#include "shared/test/common/mocks/mock_gmm_resource_info.h"
#include "shared/test/common/test_macros/hw_test.h"
namespace NEO {
extern ApiSpecificConfig::ApiType apiTypeForUlts;
}
using namespace NEO;
using GfxCoreHelperXe2AndLaterTests = ::testing::Test;
@@ -31,7 +35,14 @@ HWTEST2_F(GfxCoreHelperXe2AndLaterTests, givenAtLeastXe2HpgWhenCallIsNonCoherent
MockExecutionEnvironment mockExecutionEnvironment{};
auto &productHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper<ProductHelper>();
EXPECT_EQ(!productHelper.isDcFlushAllowed(), productHelper.isNonCoherentTimestampsModeEnabled());
{
VariableBackup<ApiSpecificConfig::ApiType> backup(&apiTypeForUlts, ApiSpecificConfig::OCL);
EXPECT_TRUE(productHelper.isNonCoherentTimestampsModeEnabled());
}
{
VariableBackup<ApiSpecificConfig::ApiType> backup(&apiTypeForUlts, ApiSpecificConfig::L0);
EXPECT_EQ(!productHelper.isDcFlushAllowed(), productHelper.isNonCoherentTimestampsModeEnabled());
}
}
HWTEST2_F(GfxCoreHelperXe2AndLaterTests, givenDebugFlagWhenCheckingIsResolveDependenciesByPipeControlsSupportedThenCorrectValueIsReturned, IsLNL) {