mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
feature: Adding support for OCL C support queries to ocloc
Feature needed for automated OCL C compilation with ocloc as backend. Added queries : * CL_DEVICE_EXTENSIONS * CL_DEVICE_EXTENSIONS_WITH_VERSION * CL_DEVICE_PROFILE * CL_DEVICE_OPENCL_C_ALL_VERSIONS * CL_DEVICE_OPENCL_C_FEATURES Sample command line: ocloc query -device skl CL_DEVICE_OPENCL_C_FEATURES Related-To: GSD-7420 Signed-off-by: Chodor, Jaroslaw <jaroslaw.chodor@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d99104d5bf
commit
7e795cd3c1
@@ -282,13 +282,9 @@ const CompilerProductHelper &ClDevice::getCompilerProductHelper() const {
|
||||
const GTPinGfxCoreHelper &ClDevice::getGTPinGfxCoreHelper() const {
|
||||
return *gtpinGfxCoreHelper;
|
||||
}
|
||||
|
||||
cl_version ClDevice::getExtensionVersion(std::string name) {
|
||||
if (name.compare("cl_khr_integer_dot_product") == 0)
|
||||
return CL_MAKE_VERSION(2u, 0, 0);
|
||||
else if (name.compare("cl_khr_external_memory") == 0)
|
||||
return CL_MAKE_VERSION(0, 9u, 1u);
|
||||
else
|
||||
return CL_MAKE_VERSION(1u, 0, 0);
|
||||
return getOclCExtensionVersion(name, CL_MAKE_VERSION(1u, 0, 0));
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -442,18 +442,12 @@ void ClDevice::initializeExtensionsWithVersion() {
|
||||
}
|
||||
|
||||
void ClDevice::initializeOpenclCAllVersions() {
|
||||
auto deviceOpenCLCVersions = this->getCompilerProductHelper().getDeviceOpenCLCVersions(this->getHardwareInfo(), {static_cast<unsigned short>(enabledClVersion / 10), static_cast<unsigned short>(enabledClVersion % 10)});
|
||||
cl_name_version openClCVersion;
|
||||
strcpy_s(openClCVersion.name, CL_NAME_VERSION_MAX_NAME_SIZE, "OpenCL C");
|
||||
|
||||
openClCVersion.version = CL_MAKE_VERSION(1, 0, 0);
|
||||
deviceInfo.openclCAllVersions.push_back(openClCVersion);
|
||||
openClCVersion.version = CL_MAKE_VERSION(1, 1, 0);
|
||||
deviceInfo.openclCAllVersions.push_back(openClCVersion);
|
||||
openClCVersion.version = CL_MAKE_VERSION(1, 2, 0);
|
||||
deviceInfo.openclCAllVersions.push_back(openClCVersion);
|
||||
|
||||
if (enabledClVersion == 30) {
|
||||
openClCVersion.version = CL_MAKE_VERSION(3, 0, 0);
|
||||
for (auto &ver : deviceOpenCLCVersions) {
|
||||
openClCVersion.version = CL_MAKE_VERSION(ver.major, ver.minor, 0);
|
||||
deviceInfo.openclCAllVersions.push_back(openClCVersion);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user