Skip to content

Commit 25d0daf

Browse files
feature: support SPIR-V 1.4 and 1.5
Related-To: NEO-14312 Signed-off-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
1 parent 64a80ae commit 25d0daf

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

opencl/test/unit_test/api/cl_get_device_info_tests.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ TEST_F(clGetDeviceInfoTests, GivenClDeviceExtensionsParamWhenGettingDeviceInfoTh
284284
}
285285
}
286286

287-
TEST_F(clGetDeviceInfoTests, GivenClDeviceIlVersionParamWhenGettingDeviceInfoThenSpirv10To13IsReturned) {
287+
TEST_F(clGetDeviceInfoTests, GivenClDeviceIlVersionParamWhenGettingDeviceInfoThenSpirv10To15IsReturned) {
288288
size_t paramRetSize = 0;
289289

290290
cl_int retVal = clGetDeviceInfo(
@@ -306,7 +306,7 @@ TEST_F(clGetDeviceInfoTests, GivenClDeviceIlVersionParamWhenGettingDeviceInfoThe
306306
nullptr);
307307

308308
EXPECT_EQ(CL_SUCCESS, retVal);
309-
EXPECT_STREQ("SPIR-V_1.3 SPIR-V_1.2 SPIR-V_1.1 SPIR-V_1.0 ", paramValue.get());
309+
EXPECT_STREQ("SPIR-V_1.5 SPIR-V_1.4 SPIR-V_1.3 SPIR-V_1.2 SPIR-V_1.1 SPIR-V_1.0 ", paramValue.get());
310310
}
311311

312312
using matcherAtMostGen12lp = IsAtMostGfxCore<IGFX_GEN12LP_CORE>;

opencl/test/unit_test/device/device_caps_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) {
175175
EXPECT_NE(0u, caps.globalMemCacheSize);
176176
EXPECT_LT(0u, sharedCaps.globalMemSize);
177177
EXPECT_EQ(sharedCaps.maxMemAllocSize, caps.maxConstantBufferSize);
178-
EXPECT_STREQ("SPIR-V_1.3 SPIR-V_1.2 SPIR-V_1.1 SPIR-V_1.0 ", sharedCaps.ilVersion);
178+
EXPECT_STREQ("SPIR-V_1.5 SPIR-V_1.4 SPIR-V_1.3 SPIR-V_1.2 SPIR-V_1.1 SPIR-V_1.0 ", sharedCaps.ilVersion);
179179
EXPECT_EQ(defaultHwInfo->capabilityTable.supportsIndependentForwardProgress, caps.independentForwardProgress);
180180

181181
EXPECT_EQ(static_cast<cl_bool>(CL_TRUE), caps.deviceAvailable);

opencl/test/unit_test/device/get_device_info_tests.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ TEST(GetDeviceInfo, GivenPreferredInteropsWhenGettingDeviceInfoThenCorrectValueI
539539
TEST(GetDeviceInfo, WhenQueryingIlsWithVersionThenProperValueIsReturned) {
540540
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
541541

542-
constexpr auto ilCount = 4;
542+
constexpr auto ilCount = 6;
543543
cl_name_version ilsWithVersion[ilCount];
544544
size_t paramRetSize;
545545

@@ -548,8 +548,9 @@ TEST(GetDeviceInfo, WhenQueryingIlsWithVersionThenProperValueIsReturned) {
548548
EXPECT_EQ(CL_SUCCESS, retVal);
549549
EXPECT_EQ(sizeof(cl_name_version) * ilCount, paramRetSize);
550550
for (int i = 0; i < ilCount; i++) {
551+
const unsigned minor = ilCount - i - 1;
551552
EXPECT_EQ(1u, CL_VERSION_MAJOR(ilsWithVersion[i].version));
552-
EXPECT_GT(4u, CL_VERSION_MINOR(ilsWithVersion[i].version));
553+
EXPECT_EQ(minor, CL_VERSION_MINOR(ilsWithVersion[i].version));
553554
EXPECT_EQ(0u, CL_VERSION_PATCH(ilsWithVersion[i].version));
554555
EXPECT_STREQ("SPIR-V", ilsWithVersion[i].name);
555556
}

shared/source/device/device_caps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
namespace NEO {
3030

31-
static const char *spirvWithVersion = "SPIR-V_1.3 SPIR-V_1.2 SPIR-V_1.1 SPIR-V_1.0 ";
31+
static const char *spirvWithVersion = "SPIR-V_1.5 SPIR-V_1.4 SPIR-V_1.3 SPIR-V_1.2 SPIR-V_1.1 SPIR-V_1.0 ";
3232

3333
size_t Device::getMaxParameterSizeFromIGC() const {
3434
CompilerInterface *compilerInterface = getCompilerInterface();

shared/test/unit_test/device/neo_device_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ TEST(DeviceGetCapsSimpleTest, givenVariousOclVersionsWhenCapsAreCreatedThenDevic
509509
debugManager.flags.ForceOCLVersion.set(oclVersion);
510510
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
511511
const auto &caps = device->getDeviceInfo();
512-
EXPECT_STREQ("SPIR-V_1.3 SPIR-V_1.2 SPIR-V_1.1 SPIR-V_1.0 ", caps.ilVersion);
512+
EXPECT_STREQ("SPIR-V_1.5 SPIR-V_1.4 SPIR-V_1.3 SPIR-V_1.2 SPIR-V_1.1 SPIR-V_1.0 ", caps.ilVersion);
513513
}
514514
}
515515

0 commit comments

Comments
 (0)