Skip to content

Commit 05a6c6b

Browse files
pcolbergsophimao
authored andcommitted
hal_mmd: pass streaming kernel arguments to simulator
Signed-off-by: Peter Colberg <[email protected]>
1 parent fb77422 commit 05a6c6b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

include/acl_types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "acl.h"
2424
#include "acl_device_binary.h"
2525
#include "acl_hal.h"
26+
#include "acl_hal_mmd.h"
2627
#include "acl_icd_dispatch.h"
2728

2829
#if defined(__cplusplus)
@@ -446,6 +447,7 @@ typedef struct acl_kernel_invocation_wrapper_t {
446447
acl_dev_kernel_invocation_image_t *image;
447448
acl_dev_kernel_invocation_image_t image_storage; // What image points to.
448449

450+
std::vector<aocl_mmd_streaming_kernel_arg_info_t> streaming_args;
449451
} acl_kernel_invocation_wrapper_t;
450452

451453
typedef struct {

src/acl_hal_mmd.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,6 +1877,14 @@ void acl_hal_mmd_copy_globalmem_to_globalmem(cl_event event, const void *src,
18771877
void acl_hal_mmd_launch_kernel(unsigned int physical_device_id,
18781878
acl_kernel_invocation_wrapper_t *wrapper) {
18791879
acl_assert_locked();
1880+
1881+
const auto &streaming_args = wrapper->streaming_args;
1882+
if (!streaming_args.empty()) {
1883+
device_info[physical_device_id]
1884+
.mmd_dispatch->aocl_mmd_simulation_streaming_kernel_args(
1885+
device_info[physical_device_id].handle, streaming_args);
1886+
}
1887+
18801888
acl_kernel_if_launch_kernel(&kern[physical_device_id], wrapper);
18811889
}
18821890

0 commit comments

Comments
 (0)