Skip to content

Commit 5309562

Browse files
authored
[CPU][DEBUG CAPS] Add support for boolean and string types in blob dumping (#30406)
### Tickets: - N/A
1 parent 981e961 commit 5309562

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/plugins/intel_cpu/src/utils/blob_dump.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,20 @@ void BlobDumper::dumpAsTxt(std::ostream& stream) const {
250250
}
251251
break;
252252
}
253+
case ov::element::boolean: {
254+
auto* blob_ptr = reinterpret_cast<const bool*>(ptr);
255+
for (size_t i = 0; i < data_size; i++) {
256+
stream << (blob_ptr[desc.getElementOffset(i)] ? 1 : 0) << '\n';
257+
}
258+
break;
259+
}
260+
case ov::element::string: {
261+
auto* blob_ptr = reinterpret_cast<const std::string*>(ptr);
262+
for (size_t i = 0; i < data_size; i++) {
263+
stream << blob_ptr[desc.getElementOffset(i)] << '\n';
264+
}
265+
break;
266+
}
253267
default:
254268
break;
255269
OPENVINO_THROW("Dumper. Unsupported precision");

0 commit comments

Comments
 (0)