mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 16:24:18 +08:00
Revert "feature: Submission for GlobalTimestamp as default"
This reverts commit 3d3c5ddf9f.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
82569f6a0f
commit
ad99c8d818
@@ -108,7 +108,7 @@ ze_result_t zeDeviceGetGlobalTimestamps(
|
|||||||
ze_device_handle_t hDevice,
|
ze_device_handle_t hDevice,
|
||||||
uint64_t *hostTimestamp,
|
uint64_t *hostTimestamp,
|
||||||
uint64_t *deviceTimestamp) {
|
uint64_t *deviceTimestamp) {
|
||||||
return L0::Device::fromHandle(hDevice)->getGlobalTimestamps(hostTimestamp, deviceTimestamp, true);
|
return L0::Device::fromHandle(hDevice)->getGlobalTimestamps(hostTimestamp, deviceTimestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
ze_result_t zeDeviceReserveCacheExt(
|
ze_result_t zeDeviceReserveCacheExt(
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ struct Device : _ze_device_handle_t {
|
|||||||
virtual ze_result_t imageGetProperties(const ze_image_desc_t *desc, ze_image_properties_t *pImageProperties) = 0;
|
virtual ze_result_t imageGetProperties(const ze_image_desc_t *desc, ze_image_properties_t *pImageProperties) = 0;
|
||||||
virtual ze_result_t getDeviceImageProperties(ze_device_image_properties_t *pDeviceImageProperties) = 0;
|
virtual ze_result_t getDeviceImageProperties(ze_device_image_properties_t *pDeviceImageProperties) = 0;
|
||||||
virtual ze_result_t getExternalMemoryProperties(ze_device_external_memory_properties_t *pExternalMemoryProperties) = 0;
|
virtual ze_result_t getExternalMemoryProperties(ze_device_external_memory_properties_t *pExternalMemoryProperties) = 0;
|
||||||
virtual ze_result_t getGlobalTimestamps(uint64_t *hostTimestamp, uint64_t *deviceTimestamp, const bool useSubmissionMethod) = 0;
|
virtual ze_result_t getGlobalTimestamps(uint64_t *hostTimestamp, uint64_t *deviceTimestamp) = 0;
|
||||||
|
|
||||||
virtual ze_result_t getCommandQueueGroupProperties(uint32_t *pCount,
|
virtual ze_result_t getCommandQueueGroupProperties(uint32_t *pCount,
|
||||||
ze_command_queue_group_properties_t *pCommandQueueGroupProperties) = 0;
|
ze_command_queue_group_properties_t *pCommandQueueGroupProperties) = 0;
|
||||||
|
|||||||
@@ -1092,18 +1092,14 @@ ze_result_t DeviceImp::getProperties(ze_device_properties_t *pDeviceProperties)
|
|||||||
return ZE_RESULT_SUCCESS;
|
return ZE_RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
ze_result_t DeviceImp::getGlobalTimestamps(uint64_t *hostTimestamp, uint64_t *deviceTimestamp, const bool useSubmissionMethod) {
|
ze_result_t DeviceImp::getGlobalTimestamps(uint64_t *hostTimestamp, uint64_t *deviceTimestamp) {
|
||||||
|
|
||||||
bool getGlobalTimestampUsingSubmissionMethod = true;
|
bool method = 0;
|
||||||
|
if (NEO::debugManager.flags.EnableGlobalTimestampViaSubmission.get() != -1) {
|
||||||
if (!useSubmissionMethod) {
|
method = NEO::debugManager.flags.EnableGlobalTimestampViaSubmission.get();
|
||||||
// It needs to be set as false because if `useSubmissionMethod` is false then it takes precedence to the debug variable `EnableGlobalTimestampViaSubmission`.
|
|
||||||
getGlobalTimestampUsingSubmissionMethod = false;
|
|
||||||
} else if (NEO::debugManager.flags.EnableGlobalTimestampViaSubmission.get() != -1) {
|
|
||||||
getGlobalTimestampUsingSubmissionMethod = !!NEO::debugManager.flags.EnableGlobalTimestampViaSubmission.get();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!getGlobalTimestampUsingSubmissionMethod) {
|
if (method == 0) {
|
||||||
auto ret = getGlobalTimestampsUsingOsInterface(hostTimestamp, deviceTimestamp);
|
auto ret = getGlobalTimestampsUsingOsInterface(hostTimestamp, deviceTimestamp);
|
||||||
if (ret != ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
|
if (ret != ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ struct DeviceImp : public Device, NEO::NonCopyableOrMovableClass {
|
|||||||
ze_result_t getCommandQueueGroupProperties(uint32_t *pCount,
|
ze_result_t getCommandQueueGroupProperties(uint32_t *pCount,
|
||||||
ze_command_queue_group_properties_t *pCommandQueueGroupProperties) override;
|
ze_command_queue_group_properties_t *pCommandQueueGroupProperties) override;
|
||||||
ze_result_t getExternalMemoryProperties(ze_device_external_memory_properties_t *pExternalMemoryProperties) override;
|
ze_result_t getExternalMemoryProperties(ze_device_external_memory_properties_t *pExternalMemoryProperties) override;
|
||||||
ze_result_t getGlobalTimestamps(uint64_t *hostTimestamp, uint64_t *deviceTimestamp, const bool useSubmissionMethod) override;
|
ze_result_t getGlobalTimestamps(uint64_t *hostTimestamp, uint64_t *deviceTimestamp) override;
|
||||||
ze_result_t getDebugProperties(zet_device_debug_properties_t *pDebugProperties) override;
|
ze_result_t getDebugProperties(zet_device_debug_properties_t *pDebugProperties) override;
|
||||||
|
|
||||||
ze_result_t systemBarrier() override;
|
ze_result_t systemBarrier() override;
|
||||||
|
|||||||
@@ -581,7 +581,7 @@ NEO::GraphicsAllocation *Event::getAllocation(Device *device) const {
|
|||||||
|
|
||||||
void Event::setGpuStartTimestamp() {
|
void Event::setGpuStartTimestamp() {
|
||||||
if (isEventTimestampFlagSet()) {
|
if (isEventTimestampFlagSet()) {
|
||||||
this->device->getGlobalTimestamps(&cpuStartTimestamp, &gpuStartTimestamp, false);
|
this->device->getGlobalTimestamps(&cpuStartTimestamp, &gpuStartTimestamp);
|
||||||
cpuStartTimestamp = cpuStartTimestamp / this->device->getNEODevice()->getDeviceInfo().outProfilingTimerResolution;
|
cpuStartTimestamp = cpuStartTimestamp / this->device->getNEODevice()->getDeviceInfo().outProfilingTimerResolution;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ struct MockDevice : public Device {
|
|||||||
ADDMETHOD_NOBASE(getCommandQueueGroupProperties, ze_result_t, ZE_RESULT_SUCCESS, (uint32_t * pCount, ze_command_queue_group_properties_t *pCommandQueueGroupProperties));
|
ADDMETHOD_NOBASE(getCommandQueueGroupProperties, ze_result_t, ZE_RESULT_SUCCESS, (uint32_t * pCount, ze_command_queue_group_properties_t *pCommandQueueGroupProperties));
|
||||||
ADDMETHOD_NOBASE(getDeviceImageProperties, ze_result_t, ZE_RESULT_SUCCESS, (ze_device_image_properties_t * pDeviceImageProperties));
|
ADDMETHOD_NOBASE(getDeviceImageProperties, ze_result_t, ZE_RESULT_SUCCESS, (ze_device_image_properties_t * pDeviceImageProperties));
|
||||||
ADDMETHOD_NOBASE(getExternalMemoryProperties, ze_result_t, ZE_RESULT_SUCCESS, (ze_device_external_memory_properties_t * pExternalMemoryProperties));
|
ADDMETHOD_NOBASE(getExternalMemoryProperties, ze_result_t, ZE_RESULT_SUCCESS, (ze_device_external_memory_properties_t * pExternalMemoryProperties));
|
||||||
ADDMETHOD_NOBASE(getGlobalTimestamps, ze_result_t, ZE_RESULT_SUCCESS, (uint64_t * hostTimestamp, uint64_t *deviceTimestamp, const bool useSubmissionMethod));
|
ADDMETHOD_NOBASE(getGlobalTimestamps, ze_result_t, ZE_RESULT_SUCCESS, (uint64_t * hostTimestamp, uint64_t *deviceTimestamp));
|
||||||
ADDMETHOD_NOBASE(systemBarrier, ze_result_t, ZE_RESULT_SUCCESS, ());
|
ADDMETHOD_NOBASE(systemBarrier, ze_result_t, ZE_RESULT_SUCCESS, ());
|
||||||
ADDMETHOD_NOBASE(getRootDevice, ze_result_t, ZE_RESULT_SUCCESS, (ze_device_handle_t * phRootDevice));
|
ADDMETHOD_NOBASE(getRootDevice, ze_result_t, ZE_RESULT_SUCCESS, (ze_device_handle_t * phRootDevice));
|
||||||
// Runtime internal methods
|
// Runtime internal methods
|
||||||
|
|||||||
@@ -1244,10 +1244,6 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListAndCpuMemcpyWitho
|
|||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListAndTimestampFlagSetWhenCpuMemcpyThenSetCorrectGpuTimestamps, MatchAny) {
|
HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListAndTimestampFlagSetWhenCpuMemcpyThenSetCorrectGpuTimestamps, MatchAny) {
|
||||||
|
|
||||||
// This test is design for testing timestamp when using the Os Interface
|
|
||||||
debugManager.flags.EnableGlobalTimestampViaSubmission.set(0);
|
|
||||||
|
|
||||||
ze_command_queue_desc_t queueDesc = {};
|
ze_command_queue_desc_t queueDesc = {};
|
||||||
auto queue = std::make_unique<Mock<CommandQueue>>(device, device->getNEODevice()->getDefaultEngine().commandStreamReceiver, &queueDesc);
|
auto queue = std::make_unique<Mock<CommandQueue>>(device, device->getNEODevice()->getDefaultEngine().commandStreamReceiver, &queueDesc);
|
||||||
MockAppendMemoryLockedCopyTestImmediateCmdList<gfxCoreFamily> cmdList;
|
MockAppendMemoryLockedCopyTestImmediateCmdList<gfxCoreFamily> cmdList;
|
||||||
|
|||||||
@@ -5037,7 +5037,6 @@ HWTEST2_F(InOrderCmdListTests, givenAubModeWhenSyncCalledAlwaysPollForCompletion
|
|||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_F(InOrderCmdListTests, givenProfilingEventWhenDoingCpuCopyThenSetProfilingData, IsAtLeastXeHpCore) {
|
HWTEST2_F(InOrderCmdListTests, givenProfilingEventWhenDoingCpuCopyThenSetProfilingData, IsAtLeastXeHpCore) {
|
||||||
|
|
||||||
auto immCmdList = createImmCmdList<gfxCoreFamily>();
|
auto immCmdList = createImmCmdList<gfxCoreFamily>();
|
||||||
immCmdList->copyThroughLockedPtrEnabled = true;
|
immCmdList->copyThroughLockedPtrEnabled = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1709,20 +1709,20 @@ TEST_F(DeviceTest, givenInvalidPciBusInfoWhenPciPropertiesIsCalledThenUninitiali
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(DeviceTest, whenGetGlobalTimestampIsCalledWithOsInterfaceViaDebugVariableThenSuccessIsReturnedAndValuesSetCorrectly) {
|
TEST_F(DeviceTest, whenGetGlobalTimestampIsCalledWithOsInterfaceThenSuccessIsReturnedAndValuesSetCorrectly) {
|
||||||
uint64_t hostTs = 0u;
|
uint64_t hostTs = 0u;
|
||||||
uint64_t deviceTs = 0u;
|
uint64_t deviceTs = 0u;
|
||||||
|
|
||||||
debugManager.flags.EnableGlobalTimestampViaSubmission.set(0);
|
debugManager.flags.EnableGlobalTimestampViaSubmission.set(0);
|
||||||
|
|
||||||
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs, true);
|
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs);
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||||
|
|
||||||
EXPECT_NE(0u, hostTs);
|
EXPECT_NE(0u, hostTs);
|
||||||
EXPECT_NE(0u, deviceTs);
|
EXPECT_NE(0u, deviceTs);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(DeviceTest, whenGetGlobalTimestampIsCalledWithSubmissionViaDebugVariableThenSuccessIsReturned) {
|
TEST_F(DeviceTest, whenGetGlobalTimestampIsCalledWithSubmissionThenSuccessIsReturned) {
|
||||||
|
|
||||||
debugManager.flags.EnableGlobalTimestampViaSubmission.set(1);
|
debugManager.flags.EnableGlobalTimestampViaSubmission.set(1);
|
||||||
|
|
||||||
@@ -1730,28 +1730,12 @@ TEST_F(DeviceTest, whenGetGlobalTimestampIsCalledWithSubmissionViaDebugVariableT
|
|||||||
uint64_t deviceTs = 0u;
|
uint64_t deviceTs = 0u;
|
||||||
|
|
||||||
// First time to hit the if case of initialization of internal structures.
|
// First time to hit the if case of initialization of internal structures.
|
||||||
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs, true);
|
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs);
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||||
EXPECT_NE(0u, hostTs);
|
EXPECT_NE(0u, hostTs);
|
||||||
|
|
||||||
// Second time to hit the false case for initialization of internal structures as they are already initialized.
|
// Second time to hit the false case for initialization of internal structures as they are already initialized.
|
||||||
result = device->getGlobalTimestamps(&hostTs, &deviceTs, true);
|
result = device->getGlobalTimestamps(&hostTs, &deviceTs);
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
|
||||||
EXPECT_NE(0u, hostTs);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(DeviceTest, whenGetGlobalTimestampIsCalledWithUseSubmissionAsTrueThenSuccessIsReturned) {
|
|
||||||
|
|
||||||
uint64_t hostTs = 0u;
|
|
||||||
uint64_t deviceTs = 0u;
|
|
||||||
|
|
||||||
// First time to hit the if case of initialization of internal structures.
|
|
||||||
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs, true);
|
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
|
||||||
EXPECT_NE(0u, hostTs);
|
|
||||||
|
|
||||||
// Second time to hit the false case for initialization of internal structures as they are already initialized.
|
|
||||||
result = device->getGlobalTimestamps(&hostTs, &deviceTs, true);
|
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||||
EXPECT_NE(0u, hostTs);
|
EXPECT_NE(0u, hostTs);
|
||||||
}
|
}
|
||||||
@@ -1769,7 +1753,7 @@ TEST_F(DeviceTest, givenAppendWriteGlobalTimestampFailsWhenGetGlobalTimestampsUs
|
|||||||
uint64_t deviceTs = 0u;
|
uint64_t deviceTs = 0u;
|
||||||
|
|
||||||
// First time to hit the if case of initialization of internal structures.
|
// First time to hit the if case of initialization of internal structures.
|
||||||
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs, true);
|
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs);
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||||
EXPECT_NE(0u, hostTs);
|
EXPECT_NE(0u, hostTs);
|
||||||
|
|
||||||
@@ -1783,7 +1767,7 @@ TEST_F(DeviceTest, givenAppendWriteGlobalTimestampFailsWhenGetGlobalTimestampsUs
|
|||||||
|
|
||||||
L0::CommandList::fromHandle(deviceImp->globalTimestampCommandList)->appendWriteGlobalTimestamp(nullptr, nullptr, 0, nullptr);
|
L0::CommandList::fromHandle(deviceImp->globalTimestampCommandList)->appendWriteGlobalTimestamp(nullptr, nullptr, 0, nullptr);
|
||||||
|
|
||||||
result = device->getGlobalTimestamps(&hostTs, &deviceTs, true);
|
result = device->getGlobalTimestamps(&hostTs, &deviceTs);
|
||||||
EXPECT_EQ(ZE_RESULT_ERROR_DEVICE_LOST, result);
|
EXPECT_EQ(ZE_RESULT_ERROR_DEVICE_LOST, result);
|
||||||
|
|
||||||
// Swap back the command list.
|
// Swap back the command list.
|
||||||
@@ -1822,7 +1806,7 @@ TEST_F(DeviceTest, givenCreateHostUnifiedMemoryAllocationFailsWhenGetGlobalTimes
|
|||||||
uint64_t hostTs = 0u;
|
uint64_t hostTs = 0u;
|
||||||
uint64_t deviceTs = 0u;
|
uint64_t deviceTs = 0u;
|
||||||
|
|
||||||
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs, true);
|
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs);
|
||||||
EXPECT_EQ(ZE_RESULT_ERROR_DEVICE_LOST, result);
|
EXPECT_EQ(ZE_RESULT_ERROR_DEVICE_LOST, result);
|
||||||
|
|
||||||
mockDriverHandleImp->setSVMAllocsManager(nullptr);
|
mockDriverHandleImp->setSVMAllocsManager(nullptr);
|
||||||
@@ -1853,7 +1837,6 @@ struct GlobalTimestampTest : public ::testing::Test {
|
|||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(GlobalTimestampTest, whenGetGlobalTimestampCalledAndGetGpuCpuTimeIsDeviceLostReturnError) {
|
TEST_F(GlobalTimestampTest, whenGetGlobalTimestampCalledAndGetGpuCpuTimeIsDeviceLostReturnError) {
|
||||||
|
|
||||||
uint64_t hostTs = 0u;
|
uint64_t hostTs = 0u;
|
||||||
uint64_t deviceTs = 0u;
|
uint64_t deviceTs = 0u;
|
||||||
|
|
||||||
@@ -1864,7 +1847,7 @@ TEST_F(GlobalTimestampTest, whenGetGlobalTimestampCalledAndGetGpuCpuTimeIsDevice
|
|||||||
driverHandle->initialize(std::move(devices));
|
driverHandle->initialize(std::move(devices));
|
||||||
device = driverHandle->devices[0];
|
device = driverHandle->devices[0];
|
||||||
|
|
||||||
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs, false);
|
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs);
|
||||||
EXPECT_EQ(ZE_RESULT_ERROR_DEVICE_LOST, result);
|
EXPECT_EQ(ZE_RESULT_ERROR_DEVICE_LOST, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1880,7 +1863,7 @@ TEST_F(GlobalTimestampTest, whenGetGlobalTimestampCalledAndGetGpuCpuTimeIsUnsupp
|
|||||||
uint64_t hostTs = 0u;
|
uint64_t hostTs = 0u;
|
||||||
uint64_t deviceTs = 0u;
|
uint64_t deviceTs = 0u;
|
||||||
|
|
||||||
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs, false);
|
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs);
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2006,12 +1989,11 @@ TEST_F(GlobalTimestampTest, whenGetGlobalTimestampsUsingSubmissionAndGetCpuTimeH
|
|||||||
uint64_t hostTs = 0u;
|
uint64_t hostTs = 0u;
|
||||||
uint64_t deviceTs = 0u;
|
uint64_t deviceTs = 0u;
|
||||||
|
|
||||||
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs, true);
|
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs);
|
||||||
EXPECT_EQ(ZE_RESULT_ERROR_DEVICE_LOST, result);
|
EXPECT_EQ(ZE_RESULT_ERROR_DEVICE_LOST, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(GlobalTimestampTest, whenGetGlobalTimestampCalledAndGetCpuTimeIsFalseReturnArbitraryValues) {
|
TEST_F(GlobalTimestampTest, whenGetGlobalTimestampCalledAndGetCpuTimeIsFalseReturnArbitraryValues) {
|
||||||
|
|
||||||
uint64_t hostTs = 0u;
|
uint64_t hostTs = 0u;
|
||||||
uint64_t deviceTs = 0u;
|
uint64_t deviceTs = 0u;
|
||||||
|
|
||||||
@@ -2022,14 +2004,14 @@ TEST_F(GlobalTimestampTest, whenGetGlobalTimestampCalledAndGetCpuTimeIsFalseRetu
|
|||||||
driverHandle->initialize(std::move(devices));
|
driverHandle->initialize(std::move(devices));
|
||||||
device = driverHandle->devices[0];
|
device = driverHandle->devices[0];
|
||||||
|
|
||||||
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs, false);
|
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs);
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||||
EXPECT_EQ(0u, hostTs);
|
EXPECT_EQ(0u, hostTs);
|
||||||
EXPECT_NE(0u, deviceTs);
|
EXPECT_NE(0u, deviceTs);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(DeviceTest, givenPrintGlobalTimestampIsSetWhenGetGlobalTimestampIsCalledThenOutputStringIsAsExpected) {
|
TEST_F(DeviceTest, givenPrintGlobalTimestampIsSetWhenGetGlobalTimestampIsCalledThenOutputStringIsAsExpected) {
|
||||||
|
DebugManagerStateRestore restorer;
|
||||||
debugManager.flags.PrintGlobalTimestampInNs.set(true);
|
debugManager.flags.PrintGlobalTimestampInNs.set(true);
|
||||||
uint64_t hostTs = 0u;
|
uint64_t hostTs = 0u;
|
||||||
uint64_t deviceTs = 0u;
|
uint64_t deviceTs = 0u;
|
||||||
@@ -2046,7 +2028,7 @@ TEST_F(DeviceTest, givenPrintGlobalTimestampIsSetWhenGetGlobalTimestampIsCalledT
|
|||||||
capabilityTable.kernelTimestampValidBits = 32;
|
capabilityTable.kernelTimestampValidBits = 32;
|
||||||
|
|
||||||
testing::internal::CaptureStdout();
|
testing::internal::CaptureStdout();
|
||||||
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs, false);
|
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs);
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||||
std::string output = testing::internal::GetCapturedStdout();
|
std::string output = testing::internal::GetCapturedStdout();
|
||||||
// Considering kernelTimestampValidBits(32)
|
// Considering kernelTimestampValidBits(32)
|
||||||
@@ -2077,7 +2059,7 @@ TEST_F(DeviceTest, givenPrintGlobalTimestampIsSetAnd64bitTimestampWhenGetGlobalT
|
|||||||
uint64_t deviceTs = 0u;
|
uint64_t deviceTs = 0u;
|
||||||
|
|
||||||
testing::internal::CaptureStdout();
|
testing::internal::CaptureStdout();
|
||||||
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs, false);
|
ze_result_t result = device->getGlobalTimestamps(&hostTs, &deviceTs);
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||||
std::string output = testing::internal::GetCapturedStdout();
|
std::string output = testing::internal::GetCapturedStdout();
|
||||||
const std::string expectedString("Host timestamp in ns : 0 | Device timestamp in ns : " +
|
const std::string expectedString("Host timestamp in ns : 0 | Device timestamp in ns : " +
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ ze_result_t getDeviceTimestamps(DeviceImp *deviceImp, const ze_bool_t synchroniz
|
|||||||
uint64_t hostTimestamp;
|
uint64_t hostTimestamp;
|
||||||
uint64_t deviceTimestamp;
|
uint64_t deviceTimestamp;
|
||||||
|
|
||||||
result = deviceImp->getGlobalTimestamps(&hostTimestamp, &deviceTimestamp, false);
|
result = deviceImp->getGlobalTimestamps(&hostTimestamp, &deviceTimestamp);
|
||||||
if (result != ZE_RESULT_SUCCESS) {
|
if (result != ZE_RESULT_SUCCESS) {
|
||||||
*globalTimestamp = 0;
|
*globalTimestamp = 0;
|
||||||
*metricTimestamp = 0;
|
*metricTimestamp = 0;
|
||||||
|
|||||||
@@ -1001,7 +1001,7 @@ ze_result_t OaMetricGroupImp::getMetricTimestampsExp(const ze_bool_t synchronize
|
|||||||
uint64_t hostTimestamp;
|
uint64_t hostTimestamp;
|
||||||
uint64_t deviceTimestamp;
|
uint64_t deviceTimestamp;
|
||||||
|
|
||||||
result = deviceImp->getGlobalTimestamps(&hostTimestamp, &deviceTimestamp, false);
|
result = deviceImp->getGlobalTimestamps(&hostTimestamp, &deviceTimestamp);
|
||||||
if (result != ZE_RESULT_SUCCESS) {
|
if (result != ZE_RESULT_SUCCESS) {
|
||||||
*globalTimestamp = 0;
|
*globalTimestamp = 0;
|
||||||
*metricTimestamp = 0;
|
*metricTimestamp = 0;
|
||||||
|
|||||||
@@ -673,7 +673,7 @@ DECLARE_DEBUG_VARIABLE(int64_t, ReadOnlyAllocationsTypeMask, 0, "0: default, >0
|
|||||||
DECLARE_DEBUG_VARIABLE(bool, IgnoreZebinUnknownAttributes, false, "enable to treat unknown zebin attributes as warning instead of error");
|
DECLARE_DEBUG_VARIABLE(bool, IgnoreZebinUnknownAttributes, false, "enable to treat unknown zebin attributes as warning instead of error");
|
||||||
DECLARE_DEBUG_VARIABLE(int64_t, FinalizerInputType, 0, "0: default (N/A), input type for finalizer")
|
DECLARE_DEBUG_VARIABLE(int64_t, FinalizerInputType, 0, "0: default (N/A), input type for finalizer")
|
||||||
DECLARE_DEBUG_VARIABLE(std::string, FinalizerLibraryName, std::string("unk"), "Library name for finalizer")
|
DECLARE_DEBUG_VARIABLE(std::string, FinalizerLibraryName, std::string("unk"), "Library name for finalizer")
|
||||||
DECLARE_DEBUG_VARIABLE(int32_t, EnableGlobalTimestampViaSubmission, -1, "-1: default (submission method), 0: os interface method, 1: submission method. This flag sets the type of method to get timestamp for getGlobalTimestamps");
|
DECLARE_DEBUG_VARIABLE(int32_t, EnableGlobalTimestampViaSubmission, -1, "-1: OS Interface, 0: OS Interface, 1: Submission. This flag sets the type of method to get timestamp for getGlobalTimestamps");
|
||||||
|
|
||||||
/* Binary Cache */
|
/* Binary Cache */
|
||||||
DECLARE_DEBUG_VARIABLE(bool, BinaryCacheTrace, false, "enable cl_cache to produce .trace files with information about hash computation")
|
DECLARE_DEBUG_VARIABLE(bool, BinaryCacheTrace, false, "enable cl_cache to produce .trace files with information about hash computation")
|
||||||
|
|||||||
Reference in New Issue
Block a user