Skip to content

Commit fe40b3c

Browse files
committed
hal_mmd: add streaming control signal functions
1 parent 109fd1b commit fe40b3c

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

include/acl_hal.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,11 @@ typedef struct {
238238
/// Allocate USM shared memory
239239
void *(*shared_alloc)(cl_device_id device, size_t size, size_t alignment,
240240
mem_properties_t *properties, int *error);
241+
242+
int (*simulation_streaming_start)(unsigned int physical_device_id,
243+
const std::string &kernel_name);
244+
int (*simulation_streaming_done)(unsigned int physical_device_id,
245+
const std::string &kernel_name);
241246
} acl_hal_t;
242247

243248
/// Linked list of MMD library names to load.

src/acl_hal_mmd.cpp

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ int acl_hal_mmd_set_profile_start_count(unsigned int physical_device_id,
153153
int acl_hal_mmd_set_profile_stop_count(unsigned int physical_device_id,
154154
unsigned int accel_id, uint64_t value);
155155

156+
int acl_hal_mmd_simulation_streaming_start(unsigned int physical_device_id,
157+
const std::string &kernel_name);
158+
int acl_hal_mmd_simulation_streaming_done(unsigned int physical_device_id,
159+
const std::string &kernel_name);
160+
156161
static size_t acl_kernel_if_read(acl_bsp_io *io, dev_addr_t src, char *dest,
157162
size_t size);
158163
static size_t acl_kernel_if_write(acl_bsp_io *io, dev_addr_t dest,
@@ -343,7 +348,9 @@ static acl_hal_t acl_hal_mmd = {
343348
acl_hal_mmd_close_devices, // close_devices
344349
acl_hal_mmd_host_alloc, // host_alloc
345350
acl_hal_mmd_free, // free
346-
acl_hal_mmd_shared_alloc // shared_alloc
351+
acl_hal_mmd_shared_alloc, // shared_alloc
352+
acl_hal_mmd_simulation_streaming_start, // simulation_streaming_start
353+
acl_hal_mmd_simulation_streaming_done, // simulation_streaming_done
347354
};
348355

349356
// This will contain the device physical id to tell us which device across all
@@ -2826,3 +2833,17 @@ unsigned acl_convert_mmd_capabilities(unsigned mmd_capabilities) {
28262833
}
28272834
return capability;
28282835
}
2836+
2837+
int acl_hal_mmd_simulation_streaming_start(unsigned int physical_device_id,
2838+
const std::string &kernel_name) {
2839+
return device_info[physical_device_id]
2840+
.mmd_dispatch->aocl_mmd_simulation_streaming_start(
2841+
device_info[physical_device_id].handle, kernel_name);
2842+
}
2843+
2844+
int acl_hal_mmd_simulation_streaming_done(unsigned int physical_device_id,
2845+
const std::string &kernel_name) {
2846+
return device_info[physical_device_id]
2847+
.mmd_dispatch->aocl_mmd_simulation_streaming_done(
2848+
device_info[physical_device_id].handle, kernel_name);
2849+
}

0 commit comments

Comments
 (0)