Skip to content

Commit 84e2279

Browse files
committed
Pass information on whether a streaming kernel has CRA arguments to MMD
1 parent 2a01a81 commit 84e2279

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

include/acl_hal.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ typedef struct {
242242

243243
void (*simulation_streaming_kernel_start)(unsigned int physical_device_id,
244244
const std::string &signal_name,
245-
const int accel_id);
245+
const int accel_id,
246+
const bool accel_has_agent_args);
246247
void (*simulation_streaming_kernel_done)(unsigned int physical_device_id,
247248
const std::string &signal_name,
248249
unsigned int &finish_counter);

include/acl_hal_mmd.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ typedef struct {
244244

245245
// Submits streaming kernel control start signal to simulator.
246246
void (*aocl_mmd_simulation_streaming_kernel_start)(
247-
int handle, const std::string &signal_name, const int accel_id);
247+
int handle, const std::string &signal_name, const int accel_id,
248+
const bool accel_has_agent_args);
248249

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

src/acl_hal_mmd.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ int acl_hal_mmd_set_profile_stop_count(unsigned int physical_device_id,
164164

165165
void acl_hal_mmd_simulation_streaming_kernel_start(
166166
unsigned int physical_device_id, const std::string &kernel_name,
167-
const int accel_id);
167+
const int accel_id, const bool accel_has_agent_args);
168168
void acl_hal_mmd_simulation_streaming_kernel_done(
169169
unsigned int physical_device_id, const std::string &kernel_name,
170170
unsigned int &finish_counter);
@@ -2970,10 +2970,11 @@ unsigned acl_convert_mmd_capabilities(unsigned mmd_capabilities) {
29702970

29712971
void acl_hal_mmd_simulation_streaming_kernel_start(
29722972
unsigned int physical_device_id, const std::string &kernel_name,
2973-
const int accel_id) {
2973+
const int accel_id, const bool accel_has_agent_args) {
29742974
device_info[physical_device_id]
29752975
.mmd_dispatch->aocl_mmd_simulation_streaming_kernel_start(
2976-
device_info[physical_device_id].handle, kernel_name, accel_id);
2976+
device_info[physical_device_id].handle, kernel_name, accel_id,
2977+
accel_has_agent_args);
29772978
}
29782979

29792980
void acl_hal_mmd_simulation_streaming_kernel_done(

src/acl_kernel_if.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,7 @@ void acl_kernel_if_launch_kernel_on_custom_sof(
11631163
image_size_static);
11641164
}
11651165

1166+
bool accel_has_agent_args = false;
11661167
if (kern->csr_version.has_value() &&
11671168
(kern->csr_version != CSR_VERSION_ID_18_1 && image->arg_value_size > 0)) {
11681169
if (!kern->accel_arg_cache[accel_id]) {
@@ -1217,7 +1218,8 @@ void acl_kernel_if_launch_kernel_on_custom_sof(
12171218
if (kern->streaming_control_signal_names[accel_id]) {
12181219
acl_get_hal()->simulation_streaming_kernel_start(
12191220
kern->physical_device_id,
1220-
kern->streaming_control_signal_names[accel_id]->start, accel_id);
1221+
kern->streaming_control_signal_names[accel_id]->start, accel_id,
1222+
accel_has_agent_args);
12211223
return;
12221224
}
12231225

0 commit comments

Comments
 (0)