Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
Update Device Name to NPU from VPU as per latest OV release
Browse files Browse the repository at this point in the history
Signed-off-by: Ritul Jasuja <[email protected]>
  • Loading branch information
Rjasuja committed Dec 8, 2023
1 parent f489074 commit 5af585c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ Return<void> Driver::getCapabilities_1_2(getCapabilities_1_2_cb cb) {

ALOGI("GPU clDNN driver Capabilities .execTime = 0.95f, .powerUsage = 0.85f");
cb(ErrorStatus::NONE, capabilities);
} else if (mDeviceType == IntelDeviceType::VPU) {
} else if (mDeviceType == IntelDeviceType::NPU) {
ALOGI("Myriad driver getCapabilities()");
V1_2::Capabilities capabilities = {
.relaxedFloat32toFloat16PerformanceScalar = {.execTime = 0.8f, .powerUsage = 0.8f},
Expand Down Expand Up @@ -342,7 +342,7 @@ Return<void> Driver::getCapabilities_1_3(getCapabilities_1_3_cb cb) {

ALOGI("GNA driver Capabilities .execTime = 0.95f, .powerUsage = 0.85f");
cb(V1_3::ErrorStatus::NONE, capabilities);
} else if (mDeviceType == IntelDeviceType::VPU) {
} else if (mDeviceType == IntelDeviceType::NPU) {
ALOGI("Driver getCapabilities()");
Capabilities capabilities = {
.relaxedFloat32toFloat16PerformanceScalar = {.execTime = 0.8f, .powerUsage = 0.8f},
Expand Down
2 changes: 1 addition & 1 deletion Driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

namespace android::hardware::neuralnetworks::nnhal {

enum class IntelDeviceType { CPU, GPU, GNA, VPU, OTHER };
enum class IntelDeviceType { CPU, GPU, GNA, NPU, OTHER };

// For HAL-1.0 version
using namespace ::android::hardware::neuralnetworks::V1_0;
Expand Down
4 changes: 2 additions & 2 deletions IENetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ bool IENetwork::loadNetwork() {
case IntelDeviceType::GNA:
deviceStr = "GNA";
break;
case IntelDeviceType::VPU:
deviceStr = "VPUX";
case IntelDeviceType::NPU:
deviceStr = "NPU";
break;
case IntelDeviceType::CPU:
default:
Expand Down
6 changes: 3 additions & 3 deletions service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ int main(int argc, char* argv[]) {

if (strncmp(deviceType, "GNA", 3) == 0)
device = new Driver(android::hardware::neuralnetworks::nnhal::IntelDeviceType::GNA);
else if (strncmp(deviceType, "VPU", 3) == 0)
device = new Driver(android::hardware::neuralnetworks::nnhal::IntelDeviceType::VPU);
else if (strncmp(deviceType, "NPU", 3) == 0)
device = new Driver(android::hardware::neuralnetworks::nnhal::IntelDeviceType::NPU);
else if (strncmp(deviceType, "GPU", 3) == 0)
device = new Driver(android::hardware::neuralnetworks::nnhal::IntelDeviceType::GPU);
else
Expand All @@ -64,7 +64,7 @@ namespace nn {

GeneralResult<SharedDevice> getService(const std::string& serviceName) {
auto driver = new android::hardware::neuralnetworks::nnhal::Driver(
android::hardware::neuralnetworks::nnhal::IntelDeviceType::VPU);
android::hardware::neuralnetworks::nnhal::IntelDeviceType::NPU);
return V1_3::utils::Device::create(serviceName, std::move(driver));
}

Expand Down

0 comments on commit 5af585c

Please sign in to comment.