Skip to content

Add accel_id parameter to simulation_streaming_kernel_start() function #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion include/acl_hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ typedef struct {
mem_properties_t *properties, int *error);

void (*simulation_streaming_kernel_start)(unsigned int physical_device_id,
const std::string &signal_name);
const std::string &signal_name,
const int accel_id);
void (*simulation_streaming_kernel_done)(unsigned int physical_device_id,
const std::string &signal_name,
unsigned int &finish_counter);
Expand Down
2 changes: 1 addition & 1 deletion include/acl_hal_mmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ typedef struct {

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

// Queries streaming kernel control done signal from simulator.
// Returns non-negative number of finished kernels invocations.
Expand Down
8 changes: 5 additions & 3 deletions src/acl_hal_mmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ int acl_hal_mmd_set_profile_stop_count(unsigned int physical_device_id,
unsigned int accel_id, uint64_t value);

void acl_hal_mmd_simulation_streaming_kernel_start(
unsigned int physical_device_id, const std::string &kernel_name);
unsigned int physical_device_id, const std::string &kernel_name,
const int accel_id);
void acl_hal_mmd_simulation_streaming_kernel_done(
unsigned int physical_device_id, const std::string &kernel_name,
unsigned int &finish_counter);
Expand Down Expand Up @@ -2810,10 +2811,11 @@ unsigned acl_convert_mmd_capabilities(unsigned mmd_capabilities) {
}

void acl_hal_mmd_simulation_streaming_kernel_start(
unsigned int physical_device_id, const std::string &kernel_name) {
unsigned int physical_device_id, const std::string &kernel_name,
const int accel_id) {
device_info[physical_device_id]
.mmd_dispatch->aocl_mmd_simulation_streaming_kernel_start(
device_info[physical_device_id].handle, kernel_name);
device_info[physical_device_id].handle, kernel_name, accel_id);
}

void acl_hal_mmd_simulation_streaming_kernel_done(
Expand Down
2 changes: 1 addition & 1 deletion src/acl_kernel_if.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ void acl_kernel_if_launch_kernel_on_custom_sof(
if (kern->streaming_control_signal_names[accel_id]) {
acl_get_hal()->simulation_streaming_kernel_start(
kern->physical_device_id,
kern->streaming_control_signal_names[accel_id]->start);
kern->streaming_control_signal_names[accel_id]->start, accel_id);
return;
}

Expand Down