Get CL Device Name with device ID appended at the end

Related-To: NEO-4744

Change-Id: I8a9a791a634f9c0c444695036d96e3c959c90de0
Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
This commit is contained in:
Slawomir Milczarek
2020-07-21 13:25:14 +02:00
committed by sys_ocldev
parent 324150dd37
commit eb8f5fa301
12 changed files with 147 additions and 12 deletions

View File

@@ -17,5 +17,15 @@ set(NEO_CORE_DEVICE
${CMAKE_CURRENT_SOURCE_DIR}/sub_device.h
)
if(SUPPORT_DG1 AND "${BRANCH_TYPE}" STREQUAL "")
list(APPEND NEO_CORE_DEVICE
${CMAKE_CURRENT_SOURCE_DIR}/device_get_device_name_dg1.cpp
)
else()
list(APPEND NEO_CORE_DEVICE
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/device_get_device_name.cpp
)
endif()
set_property(GLOBAL PROPERTY NEO_CORE_DEVICE ${NEO_CORE_DEVICE})
add_subdirectories()

View File

@@ -66,6 +66,7 @@ class Device : public ReferenceTrackedObject<Device> {
Debugger *getDebugger() { return getRootDeviceEnvironment().debugger.get(); }
NEO::SourceLevelDebugger *getSourceLevelDebugger();
const std::vector<EngineControl> &getEngines() const;
const std::string getDeviceName(const HardwareInfo &hwInfo) const;
ExecutionEnvironment *getExecutionEnvironment() const { return executionEnvironment; }
const RootDeviceEnvironment &getRootDeviceEnvironment() const { return *executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]; }

View File

@@ -0,0 +1,18 @@
/*
* Copyright (C) 2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/device/device.h"
#include "shared/source/helpers/hw_info.h"
namespace NEO {
const std::string Device::getDeviceName(const HardwareInfo &hwInfo) const {
std::string deviceName = "Intel(R) Graphics ";
deviceName += familyName[hwInfo.platform.eRenderCoreFamily];
return deviceName;
}
} // namespace NEO

View File

@@ -0,0 +1,20 @@
/*
* Copyright (C) 2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/device/device.h"
#include "shared/source/helpers/hw_info.h"
namespace NEO {
const std::string Device::getDeviceName(const HardwareInfo &hwInfo) const {
std::string deviceName = "Intel(R) Graphics";
if (hwInfo.platform.eProductFamily < PRODUCT_FAMILY::IGFX_DG1) {
deviceName += std::string(" ") + familyName[hwInfo.platform.eRenderCoreFamily];
}
return deviceName;
}
} // namespace NEO