|
23 | 23 | #include "shared/source/memory_manager/unified_memory_manager.h"
|
24 | 24 | #include "shared/source/os_interface/os_interface.h"
|
25 | 25 | #include "shared/source/os_interface/os_library.h"
|
| 26 | +#include "shared/source/release_helper/release_helper.h" |
26 | 27 | #include "shared/source/utilities/logger.h"
|
27 | 28 |
|
28 | 29 | #include "level_zero/core/source/builtin/builtin_functions_lib.h"
|
@@ -155,12 +156,30 @@ ze_result_t DriverHandleImp::getExtensionProperties(uint32_t *pCount,
|
155 | 156 |
|
156 | 157 | std::vector<std::pair<std::string, uint32_t>> additionalExtensions;
|
157 | 158 |
|
| 159 | + bool isBfloat16Supported = false; |
| 160 | + bool isBindlessHeapsSupported = false; |
158 | 161 | for (const auto device : devices) {
|
| 162 | + if (device->getNEODevice()->getRootDeviceEnvironment().getReleaseHelper()) { |
| 163 | + if (device->getNEODevice()->getRootDeviceEnvironment().getReleaseHelper()->isBFloat16ConversionSupported()) { |
| 164 | + isBfloat16Supported = true; |
| 165 | + } |
| 166 | + } |
159 | 167 | if (device->getNEODevice()->getRootDeviceEnvironment().getBindlessHeapsHelper()) {
|
160 |
| - additionalExtensions.emplace_back(ZE_BINDLESS_IMAGE_EXP_NAME, ZE_BINDLESS_IMAGE_EXP_VERSION_CURRENT); |
| 168 | + isBindlessHeapsSupported = true; |
| 169 | + } |
| 170 | + if (isBfloat16Supported && isBindlessHeapsSupported) { |
161 | 171 | break;
|
162 | 172 | }
|
163 | 173 | }
|
| 174 | + |
| 175 | + if (isBindlessHeapsSupported) { |
| 176 | + additionalExtensions.emplace_back(ZE_BINDLESS_IMAGE_EXP_NAME, ZE_BINDLESS_IMAGE_EXP_VERSION_CURRENT); |
| 177 | + } |
| 178 | + |
| 179 | + if (isBfloat16Supported) { |
| 180 | + additionalExtensions.emplace_back(ZE_BFLOAT16_CONVERSIONS_EXT_NAME, ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_1_0); |
| 181 | + } |
| 182 | + |
164 | 183 | devices[0]->getL0GfxCoreHelper().appendPlatformSpecificExtensions(additionalExtensions, devices[0]->getProductHelper(), devices[0]->getHwInfo());
|
165 | 184 |
|
166 | 185 | if (devices[0]->getL0GfxCoreHelper().synchronizedDispatchSupported() && devices[0]->isImplicitScalingCapable()) {
|
|
0 commit comments