Skip to content

Commit 07264d4

Browse files
Minor revert to fix memops2d failures
1 parent 938197c commit 07264d4

File tree

6 files changed

+8
-23
lines changed

6 files changed

+8
-23
lines changed

sycl/include/sycl/ext/oneapi/memcpy2d.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void handler::ext_oneapi_memcpy2d(void *Dest, size_t DestPitch, const void *Src,
3434
#endif
3535

3636
// Get the type of the pointers.
37-
context Ctx = detail::createSyclObjFromImpl<context>(getContextImpl());
37+
context Ctx = detail::createSyclObjFromImpl<context>(getContextImplPtr());
3838
usm::alloc SrcAllocType = get_pointer_type(Src, Ctx);
3939
usm::alloc DestAllocType = get_pointer_type(Dest, Ctx);
4040
bool SrcIsHost =
@@ -71,7 +71,7 @@ void handler::ext_oneapi_copy2d(const T *Src, size_t SrcPitch, T *Dest,
7171
"to the width specified in 'ext_oneapi_copy2d'");
7272

7373
// Get the type of the pointers.
74-
context Ctx = detail::createSyclObjFromImpl<context>(getContextImpl());
74+
context Ctx = detail::createSyclObjFromImpl<context>(getContextImplPtr());
7575
usm::alloc SrcAllocType = get_pointer_type(Src, Ctx);
7676
usm::alloc DestAllocType = get_pointer_type(Dest, Ctx);
7777
bool SrcIsHost =
@@ -106,7 +106,7 @@ void handler::ext_oneapi_memset2d(void *Dest, size_t DestPitch, int Value,
106106
"to the width specified in 'ext_oneapi_memset2d'");
107107
T CharVal = static_cast<T>(Value);
108108

109-
context Ctx = detail::createSyclObjFromImpl<context>(getContextImpl());
109+
context Ctx = detail::createSyclObjFromImpl<context>(getContextImplPtr());
110110
usm::alloc DestAllocType = get_pointer_type(Dest, Ctx);
111111

112112
// If the backends supports 2D fill we use that. Otherwise we use a fallback
@@ -130,7 +130,7 @@ void handler::ext_oneapi_fill2d(void *Dest, size_t DestPitch, const T &Pattern,
130130
"Destination pitch must be greater than or equal "
131131
"to the width specified in 'ext_oneapi_fill2d'");
132132

133-
context Ctx = detail::createSyclObjFromImpl<context>(getContextImpl());
133+
context Ctx = detail::createSyclObjFromImpl<context>(getContextImplPtr());
134134
usm::alloc DestAllocType = get_pointer_type(Dest, Ctx);
135135

136136
// If the backends supports 2D fill we use that. Otherwise we use a fallback

sycl/include/sycl/handler.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3507,10 +3507,7 @@ class __SYCL_EXPORT handler {
35073507
UserRange, KernelFunc};
35083508
}
35093509

3510-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
35113510
const std::shared_ptr<detail::context_impl> &getContextImplPtr() const;
3512-
#endif
3513-
detail::context_impl &getContextImpl() const;
35143511

35153512
// Checks if 2D memory operations are supported by the underlying platform.
35163513
bool supportsUSMMemcpy2D();

sycl/source/detail/async_alloc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void *async_malloc(sycl::handler &h, sycl::usm::alloc kind, size_t size) {
6767
sycl::make_error_code(sycl::errc::feature_not_supported),
6868
"Only device backed asynchronous allocations are supported!");
6969

70-
auto &Adapter = h.getContextImpl().getAdapter();
70+
auto &Adapter = detail::getSyclObjImpl(h)->get_context().getAdapter();
7171

7272
// Get CG event dependencies for this allocation.
7373
const auto &DepEvents = h.impl->CGData.MEvents;
@@ -117,7 +117,7 @@ __SYCL_EXPORT void *async_malloc(const sycl::queue &q, sycl::usm::alloc kind,
117117
__SYCL_EXPORT void *async_malloc_from_pool(sycl::handler &h, size_t size,
118118
const memory_pool &pool) {
119119

120-
auto &Adapter = h.getContextImpl().getAdapter();
120+
auto &Adapter = detail::getSyclObjImpl(h)->get_context().getAdapter();
121121
auto &memPoolImpl = sycl::detail::getSyclObjImpl(pool);
122122

123123
// Get CG event dependencies for this allocation.

sycl/source/detail/queue_impl.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,9 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
293293

294294
const AdapterPtr &getAdapter() const { return MContext->getAdapter(); }
295295

296-
// To be removed soon, use `getContextImpl` below instead:
297-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
298-
// This is used to implement `handler::getContextImplPtr` which is a part of
299-
// ABI:
296+
// TODO: stop using it in existing code. New code must NOT use this!
300297
const ContextImplPtr &getContextImplPtr() const { return MContext; }
301-
#endif
298+
302299
context_impl &getContextImpl() const { return *MContext; }
303300

304301
device_impl &getDeviceImpl() const { return MDevice; }

sycl/source/handler.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2173,21 +2173,13 @@ void handler::memcpyFromHostOnlyDeviceGlobal(void *Dest,
21732173
});
21742174
}
21752175

2176-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
21772176
const std::shared_ptr<detail::context_impl> &
21782177
handler::getContextImplPtr() const {
21792178
if (auto *Graph = impl->get_graph_or_null()) {
21802179
return Graph->getContextImplPtr();
21812180
}
21822181
return impl->get_queue().getContextImplPtr();
21832182
}
2184-
#endif
2185-
detail::context_impl &handler::getContextImpl() const {
2186-
if (auto *Graph = impl->get_graph_or_null()) {
2187-
return *Graph->getContextImplPtr();
2188-
}
2189-
return impl->get_queue().getContextImpl();
2190-
}
21912183

21922184
void handler::setKernelCacheConfig(handler::StableKernelCacheConfig Config) {
21932185
switch (Config) {

sycl/test/abi/sycl_symbols_linux.dump

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4082,7 +4082,6 @@ _ZNK4sycl3_V17context8get_infoINS0_4info7context7devicesEEENS0_6detail20is_conte
40824082
_ZNK4sycl3_V17context8get_infoINS0_4info7context8platformEEENS0_6detail20is_context_info_descIT_E11return_typeEv
40834083
_ZNK4sycl3_V17context9getNativeEv
40844084
_ZNK4sycl3_V17handler11eventNeededEv
4085-
_ZNK4sycl3_V17handler14getContextImplEv
40864085
_ZNK4sycl3_V17handler15getCommandGraphEv
40874086
_ZNK4sycl3_V17handler16getDeviceBackendEv
40884087
_ZNK4sycl3_V17handler17getContextImplPtrEv

0 commit comments

Comments
 (0)