mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
Update OpenCL C features reporting to the compiler
Pass features also with -cl-ext option. Change-Id: I1a1c68b655a2108be51c7d57be771591ee0b14e7 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
746cf7fd33
commit
60430d79ee
@@ -24,6 +24,8 @@ set(CLOC_LIB_SRCS_LIB
|
||||
${NEO_SHARED_DIRECTORY}/device_binary_format/elf/elf_encoder.h
|
||||
${NEO_SHARED_DIRECTORY}/device_binary_format/elf/ocl_elf.h
|
||||
${NEO_SHARED_DIRECTORY}/helpers/abort.cpp
|
||||
${NEO_SHARED_DIRECTORY}/helpers/compiler_options_parser.cpp
|
||||
${NEO_SHARED_DIRECTORY}/helpers/compiler_options_parser.h
|
||||
${NEO_SHARED_DIRECTORY}/helpers/debug_helpers.cpp
|
||||
${NEO_SHARED_DIRECTORY}/helpers/file_io.cpp
|
||||
${NEO_SHARED_DIRECTORY}/helpers/hw_info.cpp
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/device_binary_format/device_binary_formats.h"
|
||||
#include "shared/source/device_binary_format/elf/elf_encoder.h"
|
||||
#include "shared/source/device_binary_format/elf/ocl_elf.h"
|
||||
#include "shared/source/helpers/compiler_options_parser.h"
|
||||
#include "shared/source/helpers/debug_helpers.h"
|
||||
#include "shared/source/helpers/file_io.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
@@ -556,11 +557,18 @@ int OfflineCompiler::parseCommandLine(size_t numArgs, const std::vector<std::str
|
||||
argHelper->printf("Error: Cannot get HW Info for device %s.\n", deviceName.c_str());
|
||||
} else {
|
||||
std::string extensionsList = getExtensionsList(hwInfo);
|
||||
CompilerOptions::concatenateAppend(internalOptions, convertEnabledExtensionsToCompilerInternalOptions(extensionsList.c_str()));
|
||||
|
||||
StackVec<cl_name_version, 15> openclCFeatures;
|
||||
getOpenclCFeaturesList(hwInfo, openclCFeatures);
|
||||
CompilerOptions::concatenateAppend(internalOptions, convertEnabledOclCFeaturesToCompilerInternalOptions(openclCFeatures));
|
||||
if (requiresOpenClCFeatures(options)) {
|
||||
OpenClCFeaturesContainer openclCFeatures;
|
||||
getOpenclCFeaturesList(hwInfo, openclCFeatures);
|
||||
auto compilerExtensions = convertEnabledExtensionsToCompilerInternalOptions(extensionsList.c_str(), openclCFeatures);
|
||||
auto compilerFeatures = convertEnabledOclCFeaturesToCompilerInternalOptions(openclCFeatures);
|
||||
CompilerOptions::concatenateAppend(internalOptions, compilerExtensions);
|
||||
CompilerOptions::concatenateAppend(internalOptions, compilerFeatures);
|
||||
} else {
|
||||
OpenClCFeaturesContainer emptyOpenClCFeatures;
|
||||
auto compilerExtensions = convertEnabledExtensionsToCompilerInternalOptions(extensionsList.c_str(), emptyOpenClCFeatures);
|
||||
CompilerOptions::concatenateAppend(internalOptions, compilerExtensions);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user