mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Add support for device specific extensions.
Change-Id: I3ffd125875067b00bc225556c09fbe2d02f11022 Signed-off-by: Zdunowski, Piotr <piotr.zdunowski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
11a1b27399
commit
14824f1dff
@@ -159,6 +159,8 @@ void Device::initializeCaps() {
|
||||
simultaneousInterops = {0};
|
||||
appendOSExtensions(deviceExtensions);
|
||||
|
||||
deviceExtensions += hwHelper.getExtensions();
|
||||
|
||||
deviceInfo.deviceExtensions = deviceExtensions.c_str();
|
||||
|
||||
exposedBuiltinKernels = builtInKernels;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "CL/cl.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
|
||||
namespace OCLRT {
|
||||
@@ -59,6 +60,7 @@ class HwHelper {
|
||||
virtual size_t getScratchSpaceOffsetFor64bit() = 0;
|
||||
virtual const std::vector<EngineType> getGpgpuEngineInstances() const = 0;
|
||||
virtual bool getEnableLocalMemory(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual std::string getExtensions() const = 0;
|
||||
|
||||
static constexpr uint32_t lowPriorityGpgpuEngineIndex = 1;
|
||||
|
||||
@@ -146,6 +148,8 @@ class HwHelperHw : public HwHelper {
|
||||
|
||||
bool getEnableLocalMemory(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
std::string getExtensions() const override;
|
||||
|
||||
protected:
|
||||
HwHelperHw() = default;
|
||||
};
|
||||
|
||||
@@ -185,6 +185,11 @@ bool HwHelperHw<Family>::getEnableLocalMemory(const HardwareInfo &hwInfo) const
|
||||
return OSInterface::osEnableLocalMemory && isLocalMemoryEnabled(hwInfo);
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
std::string HwHelperHw<Family>::getExtensions() const {
|
||||
return "";
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
typename Family::PIPE_CONTROL *PipeControlHelper<Family>::obtainPipeControlAndProgramPostSyncOperation(LinearStream *commandStream,
|
||||
POST_SYNC_OPERATION operation,
|
||||
|
||||
Reference in New Issue
Block a user