Skip to content

Commit 865db9f

Browse files
author
Jaime Arteaga
authored
[SYCL][UR] Replace _pi_object with _ur_object (#9082)
Signed-off-by: Jaime Arteaga <[email protected]>
1 parent 502e0fd commit 865db9f

File tree

10 files changed

+21
-21
lines changed

10 files changed

+21
-21
lines changed

sycl/plugins/level_zero/pi_level_zero.hpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ template <> uint32_t inline pi_cast(uint64_t Value) {
6767

6868
// Record for a memory allocation. This structure is used to keep information
6969
// for each memory allocation.
70-
struct MemAllocRecord : _pi_object {
70+
struct MemAllocRecord : _ur_object {
7171
MemAllocRecord(pi_context Context, bool OwnZeMemHandle = true)
7272
: Context(Context), OwnZeMemHandle(OwnZeMemHandle) {}
7373
// Currently kernel can reference memory allocations from different contexts
@@ -204,7 +204,7 @@ using pi_command_list_map_t =
204204
// The iterator pointing to a specific command-list in use.
205205
using pi_command_list_ptr_t = pi_command_list_map_t::iterator;
206206

207-
struct _pi_context : _pi_object {
207+
struct _pi_context : _ur_object {
208208
_pi_context(ze_context_handle_t ZeContext, pi_uint32 NumDevices,
209209
const pi_device *Devs, bool OwnZeContext)
210210
: ZeContext{ZeContext}, OwnZeContext{OwnZeContext},
@@ -411,7 +411,7 @@ struct _pi_context : _pi_object {
411411
}
412412
};
413413

414-
struct _pi_queue : _pi_object {
414+
struct _pi_queue : _ur_object {
415415
// ForceComputeIndex, if non-negative, indicates that the queue must be fixed
416416
// to that particular compute CCS.
417417
_pi_queue(std::vector<ze_command_queue_handle_t> &ComputeQueues,
@@ -724,7 +724,7 @@ struct _pi_queue : _pi_object {
724724
active_barriers ActiveBarriers;
725725

726726
// Besides each PI object keeping a total reference count in
727-
// _pi_object::RefCount we keep special track of the queue *external*
727+
// _ur_object::RefCount we keep special track of the queue *external*
728728
// references. This way we are able to tell when the queue is being finished
729729
// externally, and can wait for internal references to complete, and do proper
730730
// cleanup of the queue.
@@ -832,7 +832,7 @@ struct _pi_queue : _pi_object {
832832
bool doReuseDiscardedEvents();
833833
};
834834

835-
struct _pi_mem : _pi_object {
835+
struct _pi_mem : _ur_object {
836836
// Keeps the PI context of this memory handle.
837837
pi_context Context;
838838

@@ -1076,7 +1076,7 @@ struct _pi_ze_event_list_t {
10761076
}
10771077
};
10781078

1079-
struct _pi_event : _pi_object {
1079+
struct _pi_event : _ur_object {
10801080
_pi_event(ze_event_handle_t ZeEvent, ze_event_pool_handle_t ZeEventPool,
10811081
pi_context Context, pi_command_type CommandType, bool OwnZeEvent)
10821082
: ZeEvent{ZeEvent}, OwnZeEvent{OwnZeEvent}, ZeEventPool{ZeEventPool},
@@ -1152,7 +1152,7 @@ struct _pi_event : _pi_object {
11521152
bool IsDiscarded = {false};
11531153

11541154
// Besides each PI object keeping a total reference count in
1155-
// _pi_object::RefCount we keep special track of the event *external*
1155+
// _ur_object::RefCount we keep special track of the event *external*
11561156
// references. This way we are able to tell when the event is not referenced
11571157
// externally anymore, i.e. it can't be passed as a dependency event to
11581158
// piEnqueue* functions and explicitly waited meaning that we can do some
@@ -1173,7 +1173,7 @@ struct _pi_event : _pi_object {
11731173
pi_result reset();
11741174
};
11751175

1176-
struct _pi_program : _pi_object {
1176+
struct _pi_program : _ur_object {
11771177
// Possible states of a program.
11781178
typedef enum {
11791179
// The program has been created from intermediate language (SPIR-V), but it
@@ -1286,7 +1286,7 @@ struct _pi_program : _pi_object {
12861286
ze_module_build_log_handle_t ZeBuildLog;
12871287
};
12881288

1289-
struct _pi_kernel : _pi_object {
1289+
struct _pi_kernel : _ur_object {
12901290
_pi_kernel(ze_kernel_handle_t Kernel, bool OwnZeKernel, pi_program Program)
12911291
: ZeKernel{Kernel}, OwnZeKernel{OwnZeKernel}, Program{Program},
12921292
MemAllocs{}, SubmissionsCount{0} {}
@@ -1363,7 +1363,7 @@ struct _pi_kernel : _pi_object {
13631363
ZeCache<std::string> ZeKernelName;
13641364
};
13651365

1366-
struct _pi_sampler : _pi_object {
1366+
struct _pi_sampler : _ur_object {
13671367
_pi_sampler(ze_sampler_handle_t Sampler) : ZeSampler{Sampler} {}
13681368

13691369
// Level Zero sampler handle.

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ enum EventsScope {
7676
LastCommandInBatchHostVisible
7777
};
7878

79-
struct _ur_device_handle_t : _pi_object {
79+
struct _ur_device_handle_t : _ur_object {
8080
_ur_device_handle_t(ze_device_handle_t Device, ur_platform_handle_t Plt,
8181
ur_device_handle_t ParentDevice = nullptr)
8282
: ZeDevice{Device}, Platform{Plt}, RootDevice{ParentDevice},

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_context.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
#include "ur_level_zero_common.hpp"
1111

12-
struct _ur_context_handle_t : _pi_object {
12+
struct _ur_context_handle_t : _ur_object {
1313
_ur_context_handle_t() {}
1414
};

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_event.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
#include "ur_level_zero_common.hpp"
1111

12-
struct _ur_event_handle_t : _pi_object {
12+
struct _ur_event_handle_t : _ur_object {
1313
_ur_event_handle_t() {}
1414
};

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_mem.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
#include "ur_level_zero_common.hpp"
1111

12-
struct _ur_mem_handle_t : _pi_object {
12+
struct _ur_mem_handle_t : _ur_object {
1313
_ur_mem_handle_t() {}
1414
};

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_module.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
#include "ur_level_zero_common.hpp"
1111

12-
struct _ur_module_handle_t : _pi_object {
12+
struct _ur_module_handle_t : _ur_object {
1313
_ur_module_handle_t() {}
1414
};
1515

16-
struct _ur_kernel_handle_t : _pi_object {
16+
struct _ur_kernel_handle_t : _ur_object {
1717
_ur_kernel_handle_t() {}
1818
};

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_program.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
#include "ur_level_zero_common.hpp"
1111

12-
struct _ur_program_handle_t : _pi_object {
12+
struct _ur_program_handle_t : _ur_object {
1313
_ur_program_handle_t() {}
1414
};

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_queue.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
#include "ur_level_zero_common.hpp"
1111

12-
struct _ur_queue_handle_t : _pi_object {
12+
struct _ur_queue_handle_t : _ur_object {
1313
_ur_queue_handle_t() {}
1414
};

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_sampler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
#include "ur_level_zero_common.hpp"
1111

12-
struct _ur_sampler_handle_t : _pi_object {
12+
struct _ur_sampler_handle_t : _ur_object {
1313
_ur_sampler_handle_t() {}
1414
};

sycl/plugins/unified_runtime/ur/ur.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ struct ReferenceCounter {
206206
};
207207

208208
// Base class to store common data
209-
struct _pi_object {
210-
_pi_object() : RefCount{} {}
209+
struct _ur_object {
210+
_ur_object() : RefCount{} {}
211211

212212
// Must be atomic to prevent data race when incrementing/decrementing.
213213
ReferenceCounter RefCount;

0 commit comments

Comments
 (0)