Skip to content

Commit d9dba48

Browse files
committed
applied Lukasz P and Rafal comments
1 parent 838451c commit d9dba48

File tree

6 files changed

+14
-11
lines changed

6 files changed

+14
-11
lines changed

src/provider/provider_level_zero.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,7 @@ static int ze_memory_provider_resident_device_change_helper(uintptr_t key,
10221022
"%p but failed to make it resident on device: %p due to err: %d",
10231023
(void *)key, (void *)change_data->peer_device, result);
10241024
++change_data->failed_changes;
1025+
store_last_native_error(result);
10251026
return 1;
10261027
}
10271028

test/common/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if(UMF_BUILD_LEVEL_ZERO_PROVIDER)
3131
add_umf_library(
3232
NAME umf_ze_loopback
3333
TYPE SHARED
34-
SRCS ze_loopback.h ze_loopback.cpp
34+
SRCS ze_loopback.cpp
3535
LINUX_MAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/ze_loopback.map
3636
WINDOWS_DEF_FILE ${CMAKE_CURRENT_SOURCE_DIR}/ze_loopback.def)
3737

test/common/level_zero_mocks.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
*
88
*/
99

10-
#include "level_zero_mocks.h"
10+
#include <cstdlib>
11+
12+
#include <umf/providers/provider_level_zero.h>
1113

12-
#include "umf/providers/provider_level_zero.h"
14+
#include "level_zero_mocks.h"
1315
#include "utils_load_library.h"
14-
#include <cstdlib>
1516

1617
using namespace ::testing;
1718

test/common/level_zero_mocks.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010
#ifndef UMF_TEST_PROVIDER_LEVEL_ZERO_MOCKS_H
1111
#define UMF_TEST_PROVIDER_LEVEL_ZERO_MOCKS_H
1212

13-
#include "utils_log.h"
14-
#include "ze_loopback.h"
1513
#include <gmock/gmock.h>
1614
#include <vector>
1715

16+
#include "utils_log.h"
17+
#include "ze_loopback.h"
18+
1819
// TEST CREATE methods for objects
1920

2021
template <class T> constexpr T TestCreatePointer(uintptr_t modifier = 0) {

test/common/ze_loopback.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
*
88
*/
99

10-
#include "ze_loopback.h"
11-
1210
#include <cstdlib>
1311
#include <iostream>
1412

13+
#include "ze_loopback.h"
14+
1515
ZE_APIEXPORT LevelZero *level_zero_mock = nullptr;
1616

1717
static void check_mock_present() {

test/pools/pool_residency.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

5+
#include <umf/pools/pool_disjoint.h>
6+
#include <umf/providers/provider_level_zero.h>
7+
58
#include "../common/level_zero_mocks.h"
69
#include "pool.hpp"
7-
#include "umf/pools/pool_disjoint.h"
8-
#include "umf/providers/provider_level_zero.h"
9-
1010
#include "gtest/gtest.h"
1111

1212
using namespace testing;

0 commit comments

Comments
 (0)