Skip to content

Commit 9b37c28

Browse files
[SYCL][ABI-Break] Drop legacy overload of queue::mem_advice (#14618)
We made a mistake several years ago by introducing `pi_mem_advice` argument into a public interface in #1239. This mistake was caught a year later and addressed in #4100, but unfortunately instead of removing this incorrect overload, it was only deprecated. The deprecation wasn't done quite correctly, because this method is *not* deprecated in SYCL 2020 - it *doesn't exists* in SYCL 2020. This PR removes the method completely, even though our messaging was wrong. The assumption is that there are no actual users who went and used undocumented non-public `pi_mem_advice` in their codebases. This is patch is essentially a by-product of #14145 and it is done to simplify that change, i.e. PI plugins removal should not be ABI-breaking by itself, we just need to cleanup some of our exported symbols.
1 parent b23233f commit 9b37c28

File tree

4 files changed

+0
-21
lines changed

4 files changed

+0
-21
lines changed

sycl/include/sycl/queue.hpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include <sycl/detail/info_desc_helpers.hpp> // for is_queue_info_...
2424
#include <sycl/detail/kernel_desc.hpp> // for KernelInfo
2525
#include <sycl/detail/owner_less_base.hpp> // for OwnerLessBase
26-
#include <sycl/detail/pi.h> // for pi_mem_advice
2726
#include <sycl/device.hpp> // for device
2827
#include <sycl/device_selector.hpp> // for device_selector
2928
#include <sycl/event.hpp> // for event
@@ -687,18 +686,6 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
687686
return this->memcpy(Dest, Src, Count * sizeof(T), DepEvents);
688687
}
689688

690-
/// Provides additional information to the underlying runtime about how
691-
/// different allocations are used.
692-
///
693-
/// \param Ptr is a USM pointer to the allocation.
694-
/// \param Length is a number of bytes in the allocation.
695-
/// \param Advice is a device-defined advice for the specified allocation.
696-
/// \return an event representing advice operation.
697-
__SYCL2020_DEPRECATED("use the overload with int Advice instead")
698-
event mem_advise(
699-
const void *Ptr, size_t Length, pi_mem_advice Advice,
700-
const detail::code_location &CodeLoc = detail::code_location::current());
701-
702689
/// Provides additional information to the underlying runtime about how
703690
/// different allocations are used.
704691
///

sycl/source/queue.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,6 @@ event queue::memcpy(void *Dest, const void *Src, size_t Count,
140140
/*CallerNeedsEvent=*/true, CodeLoc);
141141
}
142142

143-
event queue::mem_advise(const void *Ptr, size_t Length, pi_mem_advice Advice,
144-
const detail::code_location &CodeLoc) {
145-
detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
146-
return mem_advise(Ptr, Length, int(Advice));
147-
}
148-
149143
event queue::mem_advise(const void *Ptr, size_t Length, int Advice,
150144
const detail::code_location &CodeLoc) {
151145
detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);

sycl/test/abi/sycl_symbols_linux.dump

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3112,7 +3112,6 @@ _ZN4sycl3_V15eventC1Ev
31123112
_ZN4sycl3_V15eventC2EP9_cl_eventRKNS0_7contextE
31133113
_ZN4sycl3_V15eventC2ESt10shared_ptrINS0_6detail10event_implEE
31143114
_ZN4sycl3_V15eventC2Ev
3115-
_ZN4sycl3_V15queue10mem_adviseEPKvm14_pi_mem_adviceRKNS0_6detail13code_locationE
31163115
_ZN4sycl3_V15queue10mem_adviseEPKvmiNS0_5eventERKNS0_6detail13code_locationE
31173116
_ZN4sycl3_V15queue10mem_adviseEPKvmiRKNS0_6detail13code_locationE
31183117
_ZN4sycl3_V15queue10mem_adviseEPKvmiRKSt6vectorINS0_5eventESaIS5_EERKNS0_6detail13code_locationE

sycl/test/abi/sycl_symbols_windows.dump

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4133,7 +4133,6 @@
41334133
?mem_advise@queue@_V1@sycl@@QEAA?AVevent@23@PEBX_KHAEBUcode_location@detail@23@@Z
41344134
?mem_advise@queue@_V1@sycl@@QEAA?AVevent@23@PEBX_KHAEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@AEBUcode_location@detail@23@@Z
41354135
?mem_advise@queue@_V1@sycl@@QEAA?AVevent@23@PEBX_KHV423@AEBUcode_location@detail@23@@Z
4136-
?mem_advise@queue@_V1@sycl@@QEAA?AVevent@23@PEBX_KW4_pi_mem_advice@@AEBUcode_location@detail@23@@Z
41374136
?memcpy@experimental@oneapi@ext@_V1@sycl@@YAXVqueue@45@PEAXPEBX_KAEBUcode_location@detail@45@@Z
41384137
?memcpy@handler@_V1@sycl@@QEAAXPEAXPEBX_K@Z
41394138
?memcpy@queue@_V1@sycl@@QEAA?AVevent@23@PEAXPEBX_KAEBUcode_location@detail@23@@Z

0 commit comments

Comments
 (0)