Skip to content
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

Fixup data layout in programming examples #672

Merged

Conversation

erwei-xilinx
Copy link
Collaborator

@erwei-xilinx erwei-xilinx commented Jul 18, 2024

This PR makes changes to the matrix_scalar_add programming examples to fixup the following issues:

  • The original example's common.py testbench expects data layout in DDR as [IMAGE_WIDTH, IMAGE_HEIGHT], but many L2 memrefs have shape [TILE_HEIGHT, TILE_WIDTH].
  • The rest of the examples viewed accesses to those memrefs as single pointers. While correctness is maintained in most tests, there were many cases where data access pattern does not align with the n-d memref shape.

Copy link
Collaborator

@hunhoffe hunhoffe left a comment

Choose a reason for hiding this comment

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

Thank you for the changes! If the multi-launch works, we should update/close this issue here: #627

@erwei-xilinx erwei-xilinx merged commit 4905fcc into Xilinx:main Jul 19, 2024
11 checks passed
@erwei-xilinx erwei-xilinx deleted the fixup_example_memref_access_oob branch July 19, 2024 16:43
hunhoffe added a commit that referenced this pull request Jul 31, 2024
* Introduces the XRTRunner class, which is used to run programs on the npu while using common numpy operations to check the input/output
* Remove spaghetti python path logic in examples
* Allows the data_transfer_transpose to run for both float and int 32-bit datatypes
* Makes it easier to change the sizes of things in the matrix_scalar_add example
* Percolate changes from #672 to other programming examples as appropriate
* Remove relative paths in makefiles
* Make matrix_scalar_add/multi_launch_channel code correct
* Adds/updates READMEs
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.

2 participants