Skip to content

Fix simulation of multi-memory systems #29

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 2 commits into from
Dec 1, 2021
Merged

Fix simulation of multi-memory systems #29

merged 2 commits into from
Dec 1, 2021

Conversation

pcolberg
Copy link
Contributor

@pcolberg pcolberg commented Dec 1, 2021

When the runtime is initialized it needs to advertise the available
devices. For hardware this is fine because we can query the hardware
via PCIe, but for the simulation flow we don't know what the board
should look like until we receive an aocx file. To work around this
restriction, we initialize the simulation flow using the autodiscovery
string for the a10gx board. This is often fine, but in cases where we
want to simulate a board with more memory systems we will encounter an
issue. In particular, targeting different buffer_locations in the
source will often result in this assertion:

/src/acl_device_op.cpp:677: int l_is_noop_migration(acl_device_op_t*): Assertion `src_mem->reserved_allocations[dest_device].size() > dest_mem_id' failed.

Ideally we would want to allocate this space dynamically based on the
.aocx file; however, we get the .aocx file quite late for simulation
flow, after we have already created buffers.

@pcolberg pcolberg self-assigned this Dec 1, 2021
When the runtime is initialized it needs to advertise the available
devices. For hardware this is fine because we can query the hardware
via PCIe, but for the simulation flow we don't know what the board
should look like until we receive an aocx file. To work around this
restriction, we initialize the simulation flow using the autodiscovery
string for the a10gx board. This is often fine, but in cases where we
want to simulate a board with more memory systems we will encounter an
issue. In particular, targeting different `buffer_location`s in the
source will often result in this assertion:

```
/src/acl_device_op.cpp:677: int l_is_noop_migration(acl_device_op_t*): Assertion `src_mem->reserved_allocations[dest_device].size() > dest_mem_id' failed.
```

Ideally we would want to allocate this space dynamically based on the
.aocx file; however, we get the .aocx file quite late for simulation
flow, after we have already created buffers.
@pcolberg pcolberg requested a review from zibaiwan December 1, 2021 21:56
@pcolberg pcolberg merged commit d9df7a9 into intel:main Dec 1, 2021
@pcolberg pcolberg deleted the fix-multi-memory-simulation branch December 1, 2021 22:05
@pcolberg pcolberg added this to the 2022.2 milestone Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants