Skip to content

Commit 8846525

Browse files
authored
[ESIMD][NFC] Remove some obsolete ESIMD emulator related code (#12300)
The ESIMD emulator support was deleted in Sep 2023 Signed-off-by: Klochkov, Vyacheslav N <[email protected]>
1 parent f720291 commit 8846525

File tree

3 files changed

+10
-181
lines changed

3 files changed

+10
-181
lines changed

sycl/include/sycl/ext/intel/esimd/emu/detail/esimd_emulator_device_interface.hpp

Lines changed: 0 additions & 77 deletions
This file was deleted.

sycl/include/sycl/ext/intel/esimd/emu/detail/esimd_emulator_functions_v1.h

Lines changed: 0 additions & 55 deletions
This file was deleted.

sycl/source/esimd_emulator_device_interface.cpp

Lines changed: 10 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -16,62 +16,23 @@
1616
/// \ingroup sycl_pi_esimd_emulator
1717

1818
#include <sycl/detail/common.hpp>
19-
#include <sycl/ext/intel/esimd/emu/detail/esimd_emulator_device_interface.hpp>
2019

2120
namespace sycl {
2221
inline namespace _V1 {
2322
namespace detail {
2423

25-
__SYCL_EXPORT ESIMDDeviceInterface *getESIMDDeviceInterface() {
26-
// TODO (performance) cache the interface pointer, can make a difference
27-
// when calling fine-grained libCM APIs through it (like memory access in a
28-
// tight loop)
29-
void *PIOpaqueData = nullptr;
30-
31-
try {
32-
PIOpaqueData =
33-
getPluginOpaqueData<sycl::backend::ext_intel_esimd_emulator>(nullptr);
34-
} catch (...) {
35-
std::cerr << "ESIMD EMU plugin error or not loaded - try setting "
36-
"SYCL_DEVICE_FILTER=esimd_emulator:gpu environment variable"
37-
<< std::endl;
38-
throw sycl::exception(sycl::errc::feature_not_supported);
39-
}
40-
41-
ESIMDEmuPluginOpaqueData *OpaqueData =
42-
reinterpret_cast<ESIMDEmuPluginOpaqueData *>(PIOpaqueData);
43-
44-
// First check if opaque data version is compatible.
45-
if (OpaqueData->version != ESIMD_EMULATOR_PLUGIN_OPAQUE_DATA_VERSION) {
46-
// NOTE: the version check should always be '!=' as layouts of different
47-
// versions of PluginOpaqueData is not backward compatible, unlike
48-
// layout of the ESIMDDeviceInterface.
24+
struct ESIMDDeviceInterface {
25+
uintptr_t version;
26+
void *reserved;
27+
ESIMDDeviceInterface();
28+
};
4929

50-
std::cerr << __FUNCTION__ << std::endl
51-
<< "Opaque data returned by ESIMD Emu plugin is incompatible with"
52-
<< "the one used in current implementation." << std::endl
53-
<< "Returned version : " << OpaqueData->version << std::endl
54-
<< "Required version : "
55-
<< ESIMD_EMULATOR_PLUGIN_OPAQUE_DATA_VERSION << std::endl;
56-
throw sycl::exception(sycl::errc::feature_not_supported);
57-
}
58-
// Opaque data version is OK, can cast the 'data' field.
59-
ESIMDDeviceInterface *Interface =
60-
reinterpret_cast<ESIMDDeviceInterface *>(OpaqueData->data);
61-
62-
// Now check that device interface version is compatible.
63-
if (Interface->version < ESIMD_DEVICE_INTERFACE_VERSION) {
64-
std::cerr << __FUNCTION__ << std::endl
65-
<< "The device interface version provided from plug-in "
66-
<< "library is behind required device interface version"
67-
<< std::endl
68-
<< "Found version : " << Interface->version << std::endl
69-
<< "Required version :" << ESIMD_DEVICE_INTERFACE_VERSION
70-
<< std::endl;
71-
throw sycl::exception(sycl::errc::feature_not_supported);
72-
}
73-
return Interface;
30+
// TODO: this function is kept only for libsycl binary backward compatibility.
31+
// Remove it when ABI breaking changes are allowed.
32+
__SYCL_EXPORT ESIMDDeviceInterface *getESIMDDeviceInterface() {
33+
return nullptr;
7434
}
35+
7536
} // namespace detail
7637
} // namespace _V1
7738
} // namespace sycl

0 commit comments

Comments
 (0)