mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
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:

committed by
Compute-Runtime-Automation

parent
b2c80be6f9
commit
5e36b1fcbf
@ -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);
|
||||
|
Reference in New Issue
Block a user