Add getting gpu frequency for multitile devices

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2021-09-07 11:27:41 +00:00
committed by Compute-Runtime-Automation
parent 55723d0b18
commit d47751d3a7
8 changed files with 168 additions and 54 deletions

View File

@@ -18,26 +18,6 @@
using namespace NEO;
TEST(DrmQueryTest, GivenGtMaxFreqFileExistsWhenFrequencyIsQueriedThenValidValueIsReturned) {
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
executionEnvironment->prepareRootDeviceEnvironments(1);
int expectedMaxFrequency = 1000;
DrmMock drm{*executionEnvironment->rootDeviceEnvironments[0]};
auto hwInfo = *defaultHwInfo;
std::string gtMaxFreqFile = "test_files/linux/devices/device/drm/card1/gt_max_freq_mhz";
EXPECT_TRUE(fileExists(gtMaxFreqFile));
drm.setPciPath("device");
int maxFrequency = 0;
int ret = drm.getMaxGpuFrequency(hwInfo, maxFrequency);
EXPECT_EQ(0, ret);
EXPECT_EQ(expectedMaxFrequency, maxFrequency);
}
TEST(DrmQueryTest, WhenCallingIsDebugAttachAvailableThenReturnValueIsFalse) {
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
executionEnvironment->prepareRootDeviceEnvironments(1);