@@ -504,6 +504,30 @@ static bool read_device_global_mem_defs(
504
504
return result;
505
505
}
506
506
507
+ static bool read_streaming_kernel_arg_info (
508
+ const std::string &config_str, std::string::size_type &curr_pos,
509
+ std::optional<acl_streaming_kernel_arg_info> &streaming_info,
510
+ std::vector<int > &counters) noexcept {
511
+ int num_fields = 0 ;
512
+ bool result = read_int_counters (config_str, curr_pos, num_fields, counters);
513
+ counters.emplace_back (num_fields);
514
+
515
+ if (result && counters.back () > 0 ) {
516
+ streaming_info = std::make_optional (acl_streaming_kernel_arg_info{});
517
+ result = read_string_counters (config_str, curr_pos,
518
+ streaming_info->interface_name , counters);
519
+ }
520
+
521
+ while (result && counters.back () > 0 ) {
522
+ std::string tmp;
523
+ result = read_string_counters (config_str, curr_pos, tmp, counters);
524
+ }
525
+ check_section_counters (counters);
526
+ counters.pop_back ();
527
+
528
+ return result;
529
+ }
530
+
507
531
static bool read_kernel_args (const std::string &config_str,
508
532
const bool kernel_arg_info_available,
509
533
std::string::size_type &curr_pos,
@@ -597,6 +621,12 @@ static bool read_kernel_args(const std::string &config_str,
597
621
type_name = " " ;
598
622
}
599
623
624
+ std::optional<acl_streaming_kernel_arg_info> streaming_info;
625
+ if (result && counters.back () > 0 ) {
626
+ result = read_streaming_kernel_arg_info (config_str, curr_pos,
627
+ streaming_info, counters);
628
+ }
629
+
600
630
/* ****************************************************************
601
631
Since the introduction of autodiscovery forwards-compatibility,
602
632
new entries for each kernel argument section start here.
@@ -619,6 +649,7 @@ static bool read_kernel_args(const std::string &config_str,
619
649
args[j].host_accessible = host_accessible;
620
650
args[j].pipe_channel_id = pipe_channel_id;
621
651
args[j].buffer_location = buffer_location;
652
+ args[j].streaming_info = streaming_info;
622
653
}
623
654
// forward compatibility: bypassing remaining fields at the end of
624
655
// arguments section
@@ -635,6 +666,36 @@ static bool read_kernel_args(const std::string &config_str,
635
666
return result;
636
667
}
637
668
669
+ static bool read_streaming_kernel_info (
670
+ const std::string &config_str, std::string::size_type &curr_pos,
671
+ std::optional<acl_streaming_kernel_info> &streaming_info,
672
+ std::vector<int > &counters) noexcept {
673
+ int num_fields = 0 ;
674
+ bool result = read_int_counters (config_str, curr_pos, num_fields, counters);
675
+ counters.emplace_back (num_fields);
676
+
677
+ if (result && counters.back () > 0 ) {
678
+ streaming_info = std::make_optional (acl_streaming_kernel_info{});
679
+ result = read_string_counters (config_str, curr_pos, streaming_info->start ,
680
+ counters) &&
681
+ read_string_counters (config_str, curr_pos, streaming_info->done ,
682
+ counters) &&
683
+ read_string_counters (config_str, curr_pos,
684
+ streaming_info->stall_in , counters) &&
685
+ read_string_counters (config_str, curr_pos,
686
+ streaming_info->stall_out , counters);
687
+ }
688
+
689
+ while (result && counters.back () > 0 ) {
690
+ std::string tmp;
691
+ result = read_string_counters (config_str, curr_pos, tmp, counters);
692
+ }
693
+ check_section_counters (counters);
694
+ counters.pop_back ();
695
+
696
+ return result;
697
+ }
698
+
638
699
static bool read_accel_defs (const std::string &config_str,
639
700
std::string::size_type &curr_pos,
640
701
const bool kernel_arg_info_available,
@@ -872,6 +933,11 @@ static bool read_accel_defs(const std::string &config_str,
872
933
accel[i].is_sycl_compile , counters);
873
934
}
874
935
936
+ if (result && counters.back () > 0 ) {
937
+ result = read_streaming_kernel_info (config_str, curr_pos,
938
+ accel[i].streaming_info , counters);
939
+ }
940
+
875
941
// forward compatibility: bypassing remaining fields at the end of kernel
876
942
// description section
877
943
while (result && counters.size () > 0 &&
0 commit comments