Skip to content

Commit c5c751c

Browse files
Merge pull request #1538 from bratpiorka/rrudnick_fix_win
fix nightly windows build
2 parents 58f134c + 1afb113 commit c5c751c

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

test/common/level_zero_mocks.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ LevelZeroMock::initializeMemoryProviderWithResidentDevices(
2121
ze_device_handle_t device, std::vector<ze_device_handle_t> residentDevices,
2222
ze_context_handle_t context, ze_device_properties_t device_properties,
2323
ze_memory_allocation_properties_t memory_allocation_properties) {
24+
2425
umf_level_zero_memory_provider_params_handle_t params = nullptr;
2526
EXPECT_EQ(umfLevelZeroMemoryProviderParamsCreate(&params),
2627
UMF_RESULT_SUCCESS);
@@ -31,10 +32,10 @@ LevelZeroMock::initializeMemoryProviderWithResidentDevices(
3132
EXPECT_EQ(umfLevelZeroMemoryProviderParamsSetMemoryType(
3233
params, UMF_MEMORY_TYPE_DEVICE),
3334
UMF_RESULT_SUCCESS);
34-
35-
EXPECT_EQ(umfLevelZeroMemoryProviderParamsSetResidentDevices(
36-
params, residentDevices.data(), residentDevices.size()),
37-
UMF_RESULT_SUCCESS);
35+
EXPECT_EQ(
36+
umfLevelZeroMemoryProviderParamsSetResidentDevices(
37+
params, residentDevices.data(), (uint32_t)residentDevices.size()),
38+
UMF_RESULT_SUCCESS);
3839

3940
// query min page size operation upon provider initialization
4041
EXPECT_CALL(*this, zeDeviceGetProperties(device, _))

test/pools/pool_residency.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
#include "pool.hpp"
1010
#include "gtest/gtest.h"
1111

12+
// On MSVC disable C6285 warning produced by gtest:
13+
// (<non-zero constant> || <non-zero constant>) is always a non-zero constant.
14+
// Did you intend to use the bitwise-and operator?
15+
#ifdef _MSC_VER
16+
#pragma warning(disable : 6285)
17+
#endif
18+
1219
using namespace testing;
1320

1421
class PoolResidencyTestFixture : public Test {
@@ -53,6 +60,7 @@ TEST_F(PoolResidencyTestFixture,
5360
EXPECT_CALL(l0mock, zeMemAllocDevice(CONTEXT, _, _, _, OUR_DEVICE, _))
5461
.WillOnce(
5562
DoAll(SetArgPointee<5>(POINTER_0), Return(ZE_RESULT_SUCCESS)));
63+
5664
EXPECT_CALL(l0mock, zeContextMakeMemoryResident(CONTEXT, DEVICE_0, _, _))
5765
.WillOnce(Return(ZE_RESULT_SUCCESS));
5866
EXPECT_CALL(l0mock, zeContextMakeMemoryResident(CONTEXT, DEVICE_1, _, _))

0 commit comments

Comments
 (0)