Skip to content

Support streaming kernel arguments and streaming kernel control #103

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 12 commits into from
Jun 23, 2022

Conversation

pcolberg
Copy link
Contributor

@pcolberg pcolberg commented Apr 13, 2022

This introduces a backwards-incompatible change in the HAL MMD API between runtime and simulator. The first commit defines the streaming kernel argument interface, while subsequent commits will contain the implementation.

@anandhv @bsyrowik @zibaiwan @sherry-yuan @intel-jisheng1

@pcolberg pcolberg added the enhancement New feature or request label Apr 13, 2022
@pcolberg pcolberg self-assigned this Apr 13, 2022
@pcolberg pcolberg marked this pull request as draft April 13, 2022 23:44
@pcolberg pcolberg force-pushed the streaming-args branch 4 times, most recently from 63ec1b6 to c9f7cfd Compare April 30, 2022 02:27
@pcolberg pcolberg changed the title Define streaming kernel argument interface to simulator Pass through streaming kernel arguments to simulator May 4, 2022
@pcolberg pcolberg force-pushed the streaming-args branch 4 times, most recently from 51c1c30 to f751c19 Compare May 6, 2022 00:44
@pcolberg pcolberg force-pushed the streaming-args branch 2 times, most recently from cea4603 to 7d19aeb Compare May 6, 2022 19:13
pcolberg added a commit that referenced this pull request May 9, 2022
Each context maintains a pool of manually allocated invocation_wrapper
objects, which so far contained only POD types. To support the use of
non-POD types, e.g., std::vector, explicitly invoke the constructor
using placement new after malloc, and the destructor before free.

https://en.cppreference.com/w/cpp/language/new#Placement_new
#103 (comment)

Signed-off-by: Peter Colberg <peter.colberg@intel.com>
@pcolberg
Copy link
Contributor Author

pcolberg commented Jun 4, 2022

@anandhv Please see the slightly revised HAL MMD streaming kernel API.

@pcolberg
Copy link
Contributor Author

pcolberg commented Jun 8, 2022

This PR still requires a slight modification to revert the auto-discovery string format back to the initial design, after which it will be ready for integration testing.

pcolberg added 3 commits June 9, 2022 10:55
Use valid value 0 for number of fields in streaming kernel info.

Signed-off-by: Peter Colberg <peter.colberg@intel.com>
Use valid value 0 for is_sycl_compile field in kernel section.

Signed-off-by: Peter Colberg <peter.colberg@intel.com>
Use valid value 0 for number of fields in streaming kernel argument info.

Signed-off-by: Peter Colberg <peter.colberg@intel.com>
pcolberg added 9 commits June 9, 2022 13:34
This parses new fields from the kernel section for streaming kernel
control and from the kernel argument section for streaming kernels
arguments, both for simulation of IP authoring components.

The kernel section is augmented with a boolean field that specifies
whether the kernel uses streaming control, i.e., whether the kernel is
started using the streaming control start signal and queried for
completion using the streaming control done signal via the simulator.

The kernel argument section is augmented with a boolean field that
specifies whether the kernel argument is a streaming argument, i.e.,
whether the argument is excluded from the kernel invocation image and
directly streamed to the component via the simulator. If the kernel
argument is streaming, a string field is added containing the full
kernel argument name for the simulator.

Signed-off-by: Peter Colberg <peter.colberg@intel.com>
This introduces a backwards-incompatible change in the HAL MMD API
between runtime and simulator.

Signed-off-by: Peter Colberg <peter.colberg@intel.com>
Signed-off-by: Peter Colberg <peter.colberg@intel.com>
Signed-off-by: Peter Colberg <peter.colberg@intel.com>
Signed-off-by: Peter Colberg <peter.colberg@intel.com>
Signed-off-by: Peter Colberg <peter.colberg@intel.com>
Signed-off-by: Peter Colberg <peter.colberg@intel.com>
Signed-off-by: Peter Colberg <peter.colberg@intel.com>
Signed-off-by: Peter Colberg <peter.colberg@intel.com>
@sophimao sophimao marked this pull request as ready for review June 9, 2022 20:09
Copy link
Contributor

@zibaiwan zibaiwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sophimao sophimao merged commit 2342332 into intel:main Jun 23, 2022
@sophimao sophimao deleted the streaming-args branch June 23, 2022 14:06
pcolberg added a commit that referenced this pull request Jul 6, 2022
For the case of streaming control kernels in IP authoring, when passing
the start and done signals to the simulator MMD, instead of the kernel
interface name, pass the full signal names from the auto-discovery
string. Before this change, the runtime would pass the kernel name,
e.g., `_ZTSZ4mainE4MyIP` without the prefix including the kernel index
in case of multiple kernels. After this change, the runtime passes the
full signal names, e.g., `k0_ZTSZ4mainE4MyIP_streaming_start` including
the kernel index prefix and the streaming control signal suffix.

This amends #103

Signed-off-by: Peter Colberg <peter.colberg@intel.com>
ericxu233 pushed a commit to ericxu233/fpga-runtime-for-opencl that referenced this pull request Jul 14, 2022
For the case of streaming control kernels in IP authoring, when passing
the start and done signals to the simulator MMD, instead of the kernel
interface name, pass the full signal names from the auto-discovery
string. Before this change, the runtime would pass the kernel name,
e.g., `_ZTSZ4mainE4MyIP` without the prefix including the kernel index
in case of multiple kernels. After this change, the runtime passes the
full signal names, e.g., `k0_ZTSZ4mainE4MyIP_streaming_start` including
the kernel index prefix and the streaming control signal suffix.

This amends intel#103

Signed-off-by: Peter Colberg <peter.colberg@intel.com>
pcolberg added a commit that referenced this pull request Aug 16, 2022
This resolves a failure to pass local-memory sizes and global-memory
buffers as streaming arguments to a streaming kernel in simulation.

This amends #103

Signed-off-by: Peter Colberg <peter.colberg@intel.com>
pcolberg added a commit that referenced this pull request Aug 16, 2022
This resolves a failure to pass local-memory sizes and global-memory
buffers as streaming arguments to a streaming kernel in simulation.

This amends #103

Signed-off-by: Peter Colberg <peter.colberg@intel.com>
(cherry picked from commit 8336122)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support streaming control in simulation Do not query CSR for streaming control
3 participants