Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions sycl/include/sycl/detail/get_device_kernel_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ template <class Kernel> DeviceKernelInfo &getDeviceKernelInfo() {
return Info;
}

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
struct KernelNameBasedCacheT;
__SYCL_EXPORT KernelNameBasedCacheT *createKernelNameBasedCache();
#endif

} // namespace detail
} // namespace _V1
} // namespace sycl
18 changes: 0 additions & 18 deletions sycl/source/detail/device_kernel_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,8 @@ DeviceKernelInfo::DeviceKernelInfo(const CompileTimeKernelInfoTy &Info)
void DeviceKernelInfo::init(std::string_view KernelName) {
auto &PM = detail::ProgramManager::getInstance();
MImplicitLocalArgPos = PM.kernelImplicitLocalArgPos(KernelName);
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
MInitialized.store(true);
#endif
}

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
void DeviceKernelInfo::initIfEmpty(const CompileTimeKernelInfoTy &Info) {
if (MInitialized.load())
return;

CompileTimeKernelInfoTy::operator=(Info);
Name = Info.Name.data();
init(Name.data());
}
#endif

template <typename OtherTy>
inline constexpr bool operator==(const CompileTimeKernelInfoTy &LHS,
const OtherTy &RHS) {
Expand All @@ -60,11 +46,7 @@ void DeviceKernelInfo::setCompileTimeInfoIfNeeded(
const CompileTimeKernelInfoTy &Info) {
if (!isCompileTimeInfoSet())
CompileTimeKernelInfoTy::operator=(Info);
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
// In case of 6.3 compatibility mode the KernelSize is not passed to the
// runtime. So, it will always be 0 and this assert fails.
assert(isCompileTimeInfoSet());
#endif
assert(Info == *this);
}

Expand Down
21 changes: 1 addition & 20 deletions sycl/source/detail/device_kernel_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,39 +89,20 @@ struct FastKernelSubcacheT {
// into this structure and get rid of the other KernelName -> * maps.
class DeviceKernelInfo : public CompileTimeKernelInfoTy {
public:
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
DeviceKernelInfo() = default;
#endif
DeviceKernelInfo(const CompileTimeKernelInfoTy &Info);

void init(std::string_view KernelName);
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
// Initialize default-created entry that has no data recorded:
void initIfEmpty(const CompileTimeKernelInfoTy &Info);
#endif
void setCompileTimeInfoIfNeeded(const CompileTimeKernelInfoTy &Info);

FastKernelSubcacheT &getKernelSubcache() {
assertInitialized();
return MFastKernelSubcache;
}
FastKernelSubcacheT &getKernelSubcache() { return MFastKernelSubcache; }

std::optional<int> getImplicitLocalArgPos() const {
assertInitialized();
return MImplicitLocalArgPos;
}

private:
void assertInitialized() const {
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
assert(MInitialized.load() && "Data needs to be initialized before use");
#endif
}
bool isCompileTimeInfoSet() const { return KernelSize != 0; }

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
std::atomic<bool> MInitialized = false;
#endif
FastKernelSubcacheT MFastKernelSubcache;
std::optional<int> MImplicitLocalArgPos;
};
Expand Down
6 changes: 0 additions & 6 deletions sycl/source/detail/get_device_kernel_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ namespace sycl {
inline namespace _V1 {
namespace detail {

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
KernelNameBasedCacheT *createKernelNameBasedCache() {
return GlobalHandler::instance().createKernelNameBasedCache();
}
#endif

DeviceKernelInfo &getDeviceKernelInfo(const CompileTimeKernelInfoTy &Info) {
return ProgramManager::getInstance().getOrCreateDeviceKernelInfo(Info);
}
Expand Down
17 changes: 0 additions & 17 deletions sycl/source/detail/global_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,16 +218,6 @@ ThreadPool &GlobalHandler::getHostTaskThreadPool() {
return TP;
}

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
KernelNameBasedCacheT *GlobalHandler::createKernelNameBasedCache() {
static std::deque<DeviceKernelInfo> &DeviceKernelInfoStorage =
getOrCreate(MDeviceKernelInfoStorage);
LockGuard LG{MDeviceKernelInfoStorage.Lock};
return reinterpret_cast<KernelNameBasedCacheT *>(
&DeviceKernelInfoStorage.emplace_back());
}
#endif

void GlobalHandler::releaseDefaultContexts() {
// Release shared-pointers to SYCL objects.
// Note that on Windows the destruction of the default context
Expand Down Expand Up @@ -361,13 +351,6 @@ void shutdown_late() {
GlobalHandler::RTGlobalObjHandler->MScheduler.Inst.reset(nullptr);
GlobalHandler::RTGlobalObjHandler->MProgramManager.Inst.reset(nullptr);

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
// Kernel cache, which is part of device kernel info,
// stores handles to the adapter, so clear it before releasing adapters.
GlobalHandler::RTGlobalObjHandler->MDeviceKernelInfoStorage.Inst.reset(
nullptr);
#endif

// Clear the adapters and reset the instance if it was there.
GlobalHandler::RTGlobalObjHandler->unloadAdapters();
if (GlobalHandler::RTGlobalObjHandler->MAdapters.Inst)
Expand Down
3 changes: 0 additions & 3 deletions sycl/source/detail/global_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ class GlobalHandler {
ods_target_list &getOneapiDeviceSelectorTargets(const std::string &InitValue);
XPTIRegistry &getXPTIRegistry();
ThreadPool &getHostTaskThreadPool();
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
KernelNameBasedCacheT *createKernelNameBasedCache();
#endif
static void registerStaticVarShutdownHandler();

bool isOkToDefer() const;
Expand Down
24 changes: 4 additions & 20 deletions sycl/source/detail/kernel_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,9 @@ static void addArgsForLocalAccessor(detail::LocalAccessorImplHost *LAcc,

void KernelData::processArg(void *Ptr, const detail::kernel_param_kind_t &Kind,
const int Size, const size_t Index,
size_t &IndexShift, bool IsKernelCreatedFromSource
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
,
bool IsESIMD
#endif
) {
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
size_t &IndexShift,
bool IsKernelCreatedFromSource) {
bool IsESIMD = isESIMD();
#endif
using detail::kernel_param_kind_t;
size_t GlobalSize = MNDRDesc.GlobalSize[0];
for (size_t I = 1; I < MNDRDesc.Dims; ++I) {
Expand Down Expand Up @@ -296,12 +290,7 @@ void KernelData::extractArgsAndReqs(bool IsKernelCreatedFromSource) {
const detail::kernel_param_kind_t &Kind = UnPreparedArgs[I].MType;
const int &Size = UnPreparedArgs[I].MSize;
const int Index = UnPreparedArgs[I].MIndex;
processArg(Ptr, Kind, Size, Index, IndexShift, IsKernelCreatedFromSource
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
,
isESIMD()
#endif
);
processArg(Ptr, Kind, Size, Index, IndexShift, IsKernelCreatedFromSource);
}
}

Expand Down Expand Up @@ -353,12 +342,7 @@ void KernelData::extractArgsAndReqsFromLambda() {
}

processArg(Ptr, Kind, Size, I, IndexShift,
/*IsKernelCreatedFromSource=*/false
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
,
isESIMD()
#endif
);
/*IsKernelCreatedFromSource=*/false);
}
}

Expand Down
36 changes: 1 addition & 35 deletions sycl/source/detail/kernel_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,6 @@ class KernelData {
return MDeviceKernelInfoPtr->ParamDescGetter;
}

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
// TODO: remove this method in the next ABI-breaking window
// it is used by handler code that will be removed in the next
// ABI-breaking window
void setESIMD(bool IsESIMD) {
assert(MDeviceKernelInfoPtr);
MDeviceKernelInfoPtr->IsESIMD = IsESIMD;
}
#endif
bool isESIMD() const {
assert(MDeviceKernelInfoPtr);
return MDeviceKernelInfoPtr->IsESIMD;
Expand All @@ -115,26 +106,6 @@ class KernelData {
MDeviceKernelInfoPtr = Ptr;
}

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
void setKernelInfo(void *KernelFuncPtr, int KernelNumArgs,
KernelParamDescGetterT KernelParamDescGetter,
bool KernelIsESIMD, bool KernelHasSpecialCaptures) {
MKernelFuncPtr = KernelFuncPtr;

assert(MDeviceKernelInfoPtr &&
"MDeviceKernelInfoPtr must be set before calling setKernelInfo");

detail::CompileTimeKernelInfoTy Info;
Info.Name = MDeviceKernelInfoPtr->Name;
Info.NumParams = KernelNumArgs;
Info.ParamDescGetter = KernelParamDescGetter;
Info.IsESIMD = KernelIsESIMD;
Info.HasSpecialCaptures = KernelHasSpecialCaptures;

MDeviceKernelInfoPtr->initIfEmpty(Info);
}
#endif

void setKernelFunc(void *KernelFuncPtr) { MKernelFuncPtr = KernelFuncPtr; }

// Kernel launch properties getter and setters.
Expand Down Expand Up @@ -313,12 +284,7 @@ class KernelData {

void processArg(void *Ptr, const detail::kernel_param_kind_t &Kind,
const int Size, const size_t Index, size_t &IndexShift,
bool IsKernelCreatedFromSource
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
,
bool IsESIMD
#endif
);
bool IsKernelCreatedFromSource);

void extractArgsAndReqs(bool IsKernelCreatedFromSource);

Expand Down
1 change: 0 additions & 1 deletion sycl/test/abi/sycl_symbols_linux.dump
Original file line number Diff line number Diff line change
Expand Up @@ -3334,7 +3334,6 @@ _ZN4sycl3_V16detail22reduGetPreferredWGSizeERSt10shared_ptrINS1_10queue_implEEm
_ZN4sycl3_V16detail22removeDuplicateDevicesERKSt6vectorINS0_6deviceESaIS3_EE
_ZN4sycl3_V16detail23constructorNotificationEPvS2_NS0_6access6targetENS3_4modeERKNS1_13code_locationE
_ZN4sycl3_V16detail24find_device_intersectionERKSt6vectorINS0_13kernel_bundleILNS0_12bundle_stateE1EEESaIS5_EE
_ZN4sycl3_V16detail26createKernelNameBasedCacheEv
_ZN4sycl3_V16detail26isDeviceGlobalUsedInKernelEPKv
_ZN4sycl3_V16detail27getPixelCoordLinearFiltModeENS0_3vecIfLi4EEENS0_15addressing_modeENS0_5rangeILi3EEERS3_
_ZN4sycl3_V16detail28SampledImageAccessorBaseHost10getAccDataEv
Expand Down
1 change: 0 additions & 1 deletion sycl/test/abi/sycl_symbols_windows.dump
Original file line number Diff line number Diff line change
Expand Up @@ -3802,7 +3802,6 @@
?contextSetExtendedDeleter@pi@detail@_V1@sycl@@YAXAEBVcontext@34@P6AXPEAX@Z1@Z
?copyCodeLoc@handler@_V1@sycl@@AEAAXAEBV123@@Z
?cpu_selector_v@_V1@sycl@@YAHAEBVdevice@12@@Z
?createKernelNameBasedCache@detail@_V1@sycl@@YAPEAUKernelNameBasedCacheT@123@XZ
?create_image@experimental@oneapi@ext@_V1@sycl@@YA?AUsampled_image_handle@12345@AEAVimage_mem@12345@AEBUbindless_image_sampler@12345@AEBUimage_descriptor@12345@AEBVdevice@45@AEBVcontext@45@@Z
?create_image@experimental@oneapi@ext@_V1@sycl@@YA?AUsampled_image_handle@12345@AEAVimage_mem@12345@AEBUbindless_image_sampler@12345@AEBUimage_descriptor@12345@AEBVqueue@45@@Z
?create_image@experimental@oneapi@ext@_V1@sycl@@YA?AUsampled_image_handle@12345@PEAX_KAEBUbindless_image_sampler@12345@AEBUimage_descriptor@12345@AEBVdevice@45@AEBVcontext@45@@Z
Expand Down