Skip to content

Commit 7e4f157

Browse files
pcolbergsophimao
authored andcommitted
kernel_if: copy streaming control kernel names to kernel interface
Signed-off-by: Peter Colberg <[email protected]>
1 parent 736d7d9 commit 7e4f157

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

include/acl_kernel_if.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
#include "acl_hal.h"
1313
#include "acl_types.h"
1414

15+
#include <optional>
16+
#include <string>
17+
#include <vector>
18+
1519
#ifdef __cplusplus
1620
extern "C" {
1721
#endif
@@ -35,6 +39,8 @@ typedef struct {
3539
acl_kernel_if_addr_range *accel_perf_mon;
3640
unsigned int *accel_num_printfs;
3741

42+
std::vector<std::optional<std::string>> streaming_control_kernel_names;
43+
3844
// Track potential hangs
3945
time_ns last_kern_update;
4046

src/acl_kernel_if.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,16 @@ int acl_kernel_if_update(const acl_device_def_autodiscovery_t &devdef,
948948
break;
949949
}
950950
}
951+
952+
kern->streaming_control_kernel_names.clear();
953+
kern->streaming_control_kernel_names.reserve(devdef.accel.size());
954+
for (const auto &accel : devdef.accel) {
955+
std::optional<std::string> kernel_name;
956+
if (accel.streaming_control_info_available) {
957+
kernel_name = accel.iface.name;
958+
}
959+
kern->streaming_control_kernel_names.emplace_back(kernel_name);
960+
}
951961
}
952962

953963
// Do reset

0 commit comments

Comments
 (0)