aboutsummaryrefslogtreecommitdiff
path: root/driver_library/src/ethosu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'driver_library/src/ethosu.cpp')
-rw-r--r--driver_library/src/ethosu.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/driver_library/src/ethosu.cpp b/driver_library/src/ethosu.cpp
index a4feef1..0166f0a 100644
--- a/driver_library/src/ethosu.cpp
+++ b/driver_library/src/ethosu.cpp
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: Copyright 2020-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-FileCopyrightText: Copyright 2020-2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
@@ -269,11 +269,25 @@ Capabilities Device::capabilities() const {
SemanticVersion(uapi.hw_id.version_major, uapi.hw_id.version_minor),
SemanticVersion(uapi.hw_id.product_major),
SemanticVersion(uapi.hw_id.arch_major_rev, uapi.hw_id.arch_minor_rev, uapi.hw_id.arch_patch_rev)),
- HardwareConfiguration(uapi.hw_cfg.macs_per_cc, uapi.hw_cfg.cmd_stream_version, bool(uapi.hw_cfg.custom_dma)),
+ HardwareConfiguration(
+ uapi.hw_cfg.macs_per_cc, uapi.hw_cfg.cmd_stream_version, uapi.hw_cfg.type, bool(uapi.hw_cfg.custom_dma)),
SemanticVersion(uapi.driver_major_rev, uapi.driver_minor_rev, uapi.driver_patch_rev));
return capabilities;
}
+ostream &operator<<(ostream &out, const HardwareConfiguration::DeviceType &deviceType) {
+ switch (deviceType) {
+ case HardwareConfiguration::DeviceType::UNKNOWN:
+ return out << "unknown";
+ case HardwareConfiguration::DeviceType::SUBSYSTEM:
+ return out << "subsystem";
+ case HardwareConfiguration::DeviceType::DIRECT:
+ return out << "direct";
+ default:
+ throw Exception(string("Invalid device type: ").append(to_string(static_cast<uint32_t>(deviceType))).c_str());
+ }
+}
+
/****************************************************************************
* Buffer
****************************************************************************/