Disable cl_khr_subgroups extension
Related-To: NEO-3807 Change-Id: I03d6a72f897b883c10cff4f31c152d7c9f100b43 Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
This commit is contained in:
parent
09c775f347
commit
332e02ef27
|
@ -123,16 +123,18 @@ void Device::initializeCaps() {
|
|||
auto supportsVme = hwInfo.capabilityTable.supportsVme;
|
||||
auto supportsAdvancedVme = hwInfo.capabilityTable.supportsVme;
|
||||
|
||||
deviceInfo.independentForwardProgress = false;
|
||||
|
||||
if (enabledClVersion >= 21) {
|
||||
deviceInfo.independentForwardProgress = true;
|
||||
deviceExtensions += "cl_khr_subgroups ";
|
||||
if (hwHelper.allowsIndependentForwardProgress()) {
|
||||
deviceInfo.independentForwardProgress = true;
|
||||
deviceExtensions += "cl_khr_subgroups ";
|
||||
}
|
||||
deviceExtensions += "cl_khr_il_program ";
|
||||
deviceExtensions += "cl_intel_spirv_device_side_avc_motion_estimation ";
|
||||
deviceExtensions += "cl_intel_spirv_media_block_io ";
|
||||
deviceExtensions += "cl_intel_spirv_subgroups ";
|
||||
deviceExtensions += "cl_khr_spirv_no_integer_wrap_decoration ";
|
||||
} else {
|
||||
deviceInfo.independentForwardProgress = false;
|
||||
}
|
||||
|
||||
if (enabledClVersion >= 20) {
|
||||
|
|
|
@ -50,6 +50,11 @@ bool HwHelperHw<Family>::obtainRenderBufferCompressionPreference(const HardwareI
|
|||
return Gen12LPHelpers::obtainRenderBufferCompressionPreference(hwInfo, size);
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwHelperHw<Family>::allowsIndependentForwardProgress() {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
void HwHelperHw<Family>::checkResourceCompatibility(Buffer *buffer, cl_int &errorCode) {
|
||||
if (buffer->getGraphicsAllocation()->getAllocationType() == GraphicsAllocation::AllocationType::BUFFER_COMPRESSED) {
|
||||
|
|
|
@ -69,6 +69,7 @@ class HwHelper {
|
|||
virtual uint32_t getMocsIndex(GmmHelper &gmmHelper, bool l3enabled, bool l1enabled) const = 0;
|
||||
virtual bool requiresAuxResolves() const = 0;
|
||||
virtual bool tilingAllowed(bool isSharedContext, const cl_image_desc &imgDesc, bool forceLinearStorage) = 0;
|
||||
virtual bool allowsIndependentForwardProgress() = 0;
|
||||
|
||||
static constexpr uint32_t lowPriorityGpgpuEngineIndex = 1;
|
||||
|
||||
|
@ -170,6 +171,8 @@ class HwHelperHw : public HwHelper {
|
|||
|
||||
bool tilingAllowed(bool isSharedContext, const cl_image_desc &imgDesc, bool forceLinearStorage) override;
|
||||
|
||||
bool allowsIndependentForwardProgress() override;
|
||||
|
||||
protected:
|
||||
HwHelperHw() = default;
|
||||
};
|
||||
|
|
|
@ -233,4 +233,10 @@ bool HwHelperHw<GfxFamily>::tilingAllowed(bool isSharedContext, const cl_image_d
|
|||
return !(imageType == CL_MEM_OBJECT_IMAGE1D || imageType == CL_MEM_OBJECT_IMAGE1D_ARRAY ||
|
||||
imageType == CL_MEM_OBJECT_IMAGE1D_BUFFER || buffer);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool HwHelperHw<GfxFamily>::allowsIndependentForwardProgress() {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
|
|
@ -118,7 +118,9 @@ TEST(DeviceGetCapsTest, validate) {
|
|||
EXPECT_EQ(16u, caps.maxSubGroups[1]);
|
||||
EXPECT_EQ(32u, caps.maxSubGroups[2]);
|
||||
|
||||
if (device->getEnabledClVersion() >= 21) {
|
||||
auto &hwHelper = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily);
|
||||
auto subGroupsSupported = hwHelper.allowsIndependentForwardProgress();
|
||||
if (device->getEnabledClVersion() >= 21 && subGroupsSupported) {
|
||||
EXPECT_TRUE(caps.independentForwardProgress != 0);
|
||||
} else {
|
||||
EXPECT_FALSE(caps.independentForwardProgress != 0);
|
||||
|
@ -355,7 +357,13 @@ TEST(DeviceGetCapsTest, givenOpenCLVersion21WhenCapsAreCreatedThenDeviceReportsC
|
|||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_subgroups")));
|
||||
auto &hwHelper = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily);
|
||||
auto subGroupsSupported = hwHelper.allowsIndependentForwardProgress();
|
||||
if (subGroupsSupported) {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_subgroups")));
|
||||
} else {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr(std::string("cl_khr_subgroups"))));
|
||||
}
|
||||
}
|
||||
|
||||
TEST(DeviceGetCapsTest, givenOpenCLVersion20WhenCapsAreCreatedThenDeviceDoesntReportClKhrSubgroupsExtension) {
|
||||
|
|
|
@ -77,7 +77,10 @@ TEST_F(PlatformTest, PlatformgetAsCompilerEnabledExtensionsString) {
|
|||
compilerExtensions = pPlatform->peekCompilerExtensions();
|
||||
|
||||
EXPECT_THAT(compilerExtensions, ::testing::HasSubstr(std::string(" -cl-ext=-all,+cl")));
|
||||
if (std::string(pPlatform->getDevice(0)->getDeviceInfo().clVersion).find("OpenCL 2.1") != std::string::npos) {
|
||||
|
||||
auto &hwHelper = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily);
|
||||
auto subGroupsSupported = hwHelper.allowsIndependentForwardProgress();
|
||||
if (std::string(pPlatform->getDevice(0)->getDeviceInfo().clVersion).find("OpenCL 2.1") != std::string::npos && subGroupsSupported) {
|
||||
EXPECT_THAT(compilerExtensions, ::testing::HasSubstr(std::string("cl_khr_subgroups")));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue