Skip to content

Commit f4988e1

Browse files
IlanTruanovskyzibaiwan
authored andcommitted
Add accel_id parameter to simulation_streaming_kernel_start() function
This commit changes the signature of the `simulation_streaming_kernel_start()` function to allow for the code to pass in an `accel_id` argument. The purpose of this parameter is to tell the simulator which kernel should start. The simulator uses this information to send a start signal to the kernel with id `accel_id`.
1 parent 4fd583c commit f4988e1

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

include/acl_hal.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,8 @@ typedef struct {
241241
mem_properties_t *properties, int *error);
242242

243243
void (*simulation_streaming_kernel_start)(unsigned int physical_device_id,
244-
const std::string &signal_name);
244+
const std::string &signal_name,
245+
const int accel_id);
245246
void (*simulation_streaming_kernel_done)(unsigned int physical_device_id,
246247
const std::string &signal_name,
247248
unsigned int &finish_counter);

include/acl_hal_mmd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ typedef struct {
139139

140140
// Submits streaming kernel control start signal to simulator.
141141
void (*aocl_mmd_simulation_streaming_kernel_start)(
142-
int handle, const std::string &signal_name);
142+
int handle, const std::string &signal_name, const int accel_id);
143143

144144
// Queries streaming kernel control done signal from simulator.
145145
// Returns non-negative number of finished kernels invocations.

src/acl_hal_mmd.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ int acl_hal_mmd_set_profile_stop_count(unsigned int physical_device_id,
155155
unsigned int accel_id, uint64_t value);
156156

157157
void acl_hal_mmd_simulation_streaming_kernel_start(
158-
unsigned int physical_device_id, const std::string &kernel_name);
158+
unsigned int physical_device_id, const std::string &kernel_name,
159+
const int accel_id);
159160
void acl_hal_mmd_simulation_streaming_kernel_done(
160161
unsigned int physical_device_id, const std::string &kernel_name,
161162
unsigned int &finish_counter);
@@ -2839,10 +2840,11 @@ unsigned acl_convert_mmd_capabilities(unsigned mmd_capabilities) {
28392840
}
28402841

28412842
void acl_hal_mmd_simulation_streaming_kernel_start(
2842-
unsigned int physical_device_id, const std::string &kernel_name) {
2843+
unsigned int physical_device_id, const std::string &kernel_name,
2844+
const int accel_id) {
28432845
device_info[physical_device_id]
28442846
.mmd_dispatch->aocl_mmd_simulation_streaming_kernel_start(
2845-
device_info[physical_device_id].handle, kernel_name);
2847+
device_info[physical_device_id].handle, kernel_name, accel_id);
28462848
}
28472849

28482850
void acl_hal_mmd_simulation_streaming_kernel_done(

src/acl_kernel_if.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ void acl_kernel_if_launch_kernel_on_custom_sof(
13081308
if (kern->streaming_control_signal_names[accel_id]) {
13091309
acl_get_hal()->simulation_streaming_kernel_start(
13101310
kern->physical_device_id,
1311-
kern->streaming_control_signal_names[accel_id]->start);
1311+
kern->streaming_control_signal_names[accel_id]->start, accel_id);
13121312
return;
13131313
}
13141314

0 commit comments

Comments
 (0)