Revert "Calculate CS timestamp based on OA timestamp and frequencies ratio"

This reverts commit 03c528382f.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2022-10-16 10:18:47 +02:00
committed by Compute-Runtime-Automation
parent b2c80be6f9
commit 5e36b1fcbf
13 changed files with 60 additions and 59 deletions

View File

@ -6,6 +6,9 @@
*/
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/test/common/mocks/mock_execution_environment.h"
#include "shared/test/common/mocks/mock_ostime.h"
#include "shared/test/common/mocks/mock_ostime_win.h"
#include "shared/test/common/mocks/mock_wddm.h"
#include "shared/test/common/test_macros/test.h"
@ -15,6 +18,25 @@ using namespace NEO;
namespace ULT {
typedef ::testing::Test MockOSTimeWinTest;
TEST_F(MockOSTimeWinTest, whenCreatingTimerThenResolutionIsSetCorrectly) {
MockExecutionEnvironment executionEnvironment;
RootDeviceEnvironment rootDeviceEnvironment(executionEnvironment);
auto wddmMock = new WddmMock(rootDeviceEnvironment);
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
wddmMock->init();
wddmMock->timestampFrequency = 1000;
std::unique_ptr<MockOSTimeWin> timeWin(new MockOSTimeWin(wddmMock));
double res = 0.0;
res = timeWin->getDynamicDeviceTimerResolution(device->getHardwareInfo());
EXPECT_EQ(res, 1e+06);
}
TEST(GetDeviceInfo, givenClDeviceWhenGettingDeviceInfoThenCorrectAdapterLuidIsReturned) {
auto clDevice = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
clDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface);