mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 15:12:56 +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
@@ -29,7 +29,9 @@ ClDevice::ClDevice(Device &device, Platform *platform) : device(device), platfor
|
||||
auto osInterface = getRootDeviceEnvironment().osInterface.get();
|
||||
driverInfo.reset(DriverInfo::create(&device.getHardwareInfo(), osInterface));
|
||||
initializeCaps();
|
||||
compilerExtensions = convertEnabledExtensionsToCompilerInternalOptions(deviceInfo.deviceExtensions);
|
||||
OpenClCFeaturesContainer emptyOpenClCFeatures;
|
||||
compilerExtensions = convertEnabledExtensionsToCompilerInternalOptions(deviceInfo.deviceExtensions, emptyOpenClCFeatures);
|
||||
compilerExtensionsWithFeatures = convertEnabledExtensionsToCompilerInternalOptions(deviceInfo.deviceExtensions, deviceInfo.openclCFeatures);
|
||||
compilerFeatures = convertEnabledOclCFeaturesToCompilerInternalOptions(deviceInfo.openclCFeatures);
|
||||
|
||||
auto numAvailableDevices = device.getNumAvailableDevices();
|
||||
@@ -179,6 +181,9 @@ void ClDeviceVector::toDeviceIDs(std::vector<cl_device_id> &devIDs) {
|
||||
const std::string &ClDevice::peekCompilerExtensions() const {
|
||||
return compilerExtensions;
|
||||
}
|
||||
const std::string &ClDevice::peekCompilerExtensionsWithFeatures() const {
|
||||
return compilerExtensionsWithFeatures;
|
||||
}
|
||||
const std::string &ClDevice::peekCompilerFeatures() const {
|
||||
return compilerFeatures;
|
||||
}
|
||||
|
||||
@@ -117,6 +117,7 @@ class ClDevice : public BaseObject<_cl_device_id> {
|
||||
const DeviceInfo &getSharedDeviceInfo() const;
|
||||
ClDevice *getDeviceById(uint32_t deviceId);
|
||||
const std::string &peekCompilerExtensions() const;
|
||||
const std::string &peekCompilerExtensionsWithFeatures() const;
|
||||
const std::string &peekCompilerFeatures() const;
|
||||
std::unique_ptr<SyncBufferHandler> syncBufferHandler;
|
||||
DeviceBitfield getDeviceBitfield() const;
|
||||
@@ -146,6 +147,7 @@ class ClDevice : public BaseObject<_cl_device_id> {
|
||||
|
||||
std::vector<unsigned int> simultaneousInterops = {0};
|
||||
std::string compilerExtensions;
|
||||
std::string compilerExtensionsWithFeatures;
|
||||
std::string compilerFeatures;
|
||||
};
|
||||
|
||||
|
||||
@@ -15,12 +15,14 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using OpenClCFeaturesContainer = StackVec<cl_name_version, 15>;
|
||||
|
||||
// clang-format off
|
||||
struct ClDeviceInfo {
|
||||
cl_name_version ilsWithVersion[1];
|
||||
StackVec<cl_name_version, 3> builtInKernelsWithVersion;
|
||||
StackVec<cl_name_version, 5> openclCAllVersions;
|
||||
StackVec<cl_name_version, 15> openclCFeatures;
|
||||
OpenClCFeaturesContainer openclCFeatures;
|
||||
std::vector<cl_name_version> extensionsWithVersion;
|
||||
cl_device_type deviceType;
|
||||
size_t maxSliceCount;
|
||||
|
||||
Reference in New Issue
Block a user