Skip to content

Commit 72c1b68

Browse files
committed
kernel_if: query streaming control done signal
1 parent 569c6c0 commit 72c1b68

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

src/acl_kernel_if.cpp

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,14 +1502,25 @@ void acl_kernel_if_update_status(acl_kernel_if *kern) {
15021502
const int activation_id = kern->accel_job_ids[accel_id][next_queue_back];
15031503
std::optional<unsigned int> printf_size;
15041504

1505-
if (!acl_kernel_if_update_status_done(kern, accel_id, activation_id,
1506-
printf_size)) {
1507-
continue;
1505+
if (kern->streaming_control_kernel_names[accel_id]) {
1506+
// FIXME define and handle return code
1507+
if (!(acl_get_hal()->simulation_streaming_done(
1508+
kern->physical_device_id,
1509+
*kern->streaming_control_kernel_names[accel_id]) > 0)) {
1510+
continue;
1511+
}
1512+
} else {
1513+
if (!acl_kernel_if_update_status_done(kern, accel_id, activation_id,
1514+
printf_size)) {
1515+
continue;
1516+
}
15081517
}
15091518

15101519
kern->last_kern_update = acl_kernel_if_get_time_us(kern);
15111520

1512-
if (kern->csr_version == CSR_VERSION_ID_18_1) {
1521+
// FIXME handle multiple completions for streaming control
1522+
if (kern->streaming_control_kernel_names[accel_id] ||
1523+
kern->csr_version == CSR_VERSION_ID_18_1) {
15131524
// Only expect single completion for older csr version
15141525
finish_counter = 1;
15151526
} else {

0 commit comments

Comments
 (0)