Skip to content

Commit ae209f2

Browse files
authored
[PTI-LIB] Fix Warnings in Older Versions VS2022 (#463)
Signed-off-by: Schilling, Matthew <[email protected]>
1 parent f0157f6 commit ae209f2

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

sdk/test/main_dpcgemm_fixture.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -906,14 +906,14 @@ TEST_P(MainFixtureTest, ApiCallsGenerationDriver) {
906906
std::cout << "Env set 1 case: " << zecall_count << "\n";
907907
// If env var is explicitly 1 -- then L0 call count should be more than 1
908908
// -- since the granular apis have no effect
909-
EXPECT_GE(zecall_count, 2);
909+
EXPECT_GE(zecall_count, 2ULL);
910910
} else {
911911
std::cout << "Env Unset case-Granular(" << granular_on << "): " << zecall_count << "\n";
912912
// If env is unset
913-
if (granular_on) { // and granular api is individually on.
914-
EXPECT_EQ(zecall_count, 1); // call count should be exactly 1
913+
if (granular_on) { // and granular api is individually on.
914+
EXPECT_EQ(zecall_count, 1ULL); // call count should be exactly 1
915915
} else {
916-
EXPECT_GE(zecall_count, 2); // no granular hence call count should be all calls (> 1)
916+
EXPECT_GE(zecall_count, 2ULL); // no granular hence call count should be all calls (> 1)
917917
}
918918
}
919919
} else {
@@ -1749,14 +1749,14 @@ TEST_P(MainFixtureTest, ApiCallsGenerationRuntime) {
17491749
std::cout << "Env set 1 case: " << urcall_count << "\n";
17501750
// If env var is explicitly 1 -- then ur call count should be more than 1
17511751
// -- since the granular apis have no effect
1752-
EXPECT_GE(urcall_count, 2);
1752+
EXPECT_GE(urcall_count, 2ULL);
17531753
} else {
17541754
// If env is unset
17551755
std::cout << "Env Unset case-Granular(" << granular_on << "): " << urcall_count << "\n";
1756-
if (granular_on) { // and granular api is individually on.
1757-
EXPECT_EQ(urcall_count, 1); // call count should be exactly 1
1756+
if (granular_on) { // and granular api is individually on.
1757+
EXPECT_EQ(urcall_count, 1ULL); // call count should be exactly 1
17581758
} else {
1759-
EXPECT_GE(urcall_count, 2); // no granular hence call count should be all calls (> 1)
1759+
EXPECT_GE(urcall_count, 2ULL); // no granular hence call count should be all calls (> 1)
17601760
}
17611761
}
17621762
} else {

sdk/test/main_zegemm_fixture.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,8 +1089,8 @@ class LocalModeZeGemmTest : public testing::Test {
10891089
}
10901090

10911091
void AppendGemmKernel() {
1092-
ASSERT_NE(group_size_[0], 0);
1093-
ASSERT_NE(group_size_[1], 0);
1092+
ASSERT_NE(group_size_[0], 0U);
1093+
ASSERT_NE(group_size_[1], 0U);
10941094
const ze_group_count_t dim = {size_ / group_size_[0], size_ / group_size_[1], 1};
10951095
ASSERT_NE(cmd_list_, nullptr);
10961096
auto status = zeCommandListAppendLaunchKernel(cmd_list_, knl_, &dim, evt_, 0, nullptr);
@@ -1326,8 +1326,8 @@ TEST_F(LocalModeZeGemmTest, TestStartTracingExecuteCommandQueue) {
13261326

13271327
DisableAndFlushAllViews();
13281328

1329-
EXPECT_EQ(LocalModeZeGemmTestData::Instance().num_ze_records, 2);
1330-
EXPECT_EQ(LocalModeZeGemmTestData::Instance().num_kernels, 0);
1329+
EXPECT_EQ(LocalModeZeGemmTestData::Instance().num_ze_records, static_cast<size_t>(2));
1330+
EXPECT_EQ(LocalModeZeGemmTestData::Instance().num_kernels, static_cast<size_t>(0));
13311331

13321332
ValidateGemmKernel();
13331333
}
@@ -1351,7 +1351,7 @@ TEST_F(LocalModeZeGemmTest, TestStartTracingPrepareCommandList) {
13511351

13521352
DisableAndFlushAllViews();
13531353

1354-
EXPECT_EQ(LocalModeZeGemmTestData::Instance().num_kernels, 1);
1354+
EXPECT_EQ(LocalModeZeGemmTestData::Instance().num_kernels, static_cast<size_t>(1));
13551355

13561356
ValidateGemmKernel();
13571357
}

0 commit comments

Comments
 (0)