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

IREE AIE #14

Open
wants to merge 20 commits into
base: amd-staging
Choose a base branch
from
Open

IREE AIE #14

wants to merge 20 commits into from

Conversation

makslevental
Copy link
Collaborator

No description provided.

@makslevental makslevental force-pushed the makslevental/aie-tests branch 13 times, most recently from 1aa93eb to 127c9a5 Compare August 31, 2024 00:52
@makslevental makslevental mentioned this pull request Aug 31, 2024
Base automatically changed from makslevental/aie-tests to amd-staging August 31, 2024 01:00
@makslevental makslevental changed the title Iree aie IREE AIE Aug 31, 2024
@atgutier
Copy link
Collaborator

atgutier commented Sep 3, 2024

Before merging this PR I'd like for us to explore if we can remove the need for a new AMD ext function (change 3d8273b) for setting HW CTX config. I think this more properly belongs as a parameter that should be set in the dispatch pkt.

If that doesn't work, we can leverage the ext I added. But, we should have a really good reason for proposing a new ext so want to think on it some more.

@makslevental
Copy link
Collaborator Author

makslevental commented Sep 3, 2024

Before merging this PR I'd like for us to explore if we can remove the need for a new AMD ext function (change 3d8273b) for setting HW CTX config. I think this more properly belongs as a parameter that should be set in the dispatch pkt.

If that doesn't work, we can leverage the ext I added. But, we should have a really good reason for proposing a new ext so want to think on it some more.

Just FYI my current theory of operations in this repo is not to merge this branch but rather use it as a dev branch from which to send PRs upstream that then wind up in amd-staging (such that this can be rebased on top). And then iree-amd-aie tracks this branch as a submodule for dev and amd-staging for prod (which we do not have yet lol).

I say current because I'm not 100% sure if this is the right arrangement (will probably discuss with @MaheshRavishankar this week).

atgutier and others added 9 commits September 10, 2024 12:13
Adds support for initialzing the XDNA driver so that
a hardware context can be created for an AIE queue.

Right now this initializes the device heap in the driver,
gets the relevant tile parameters for the AIE agent,
and creates a hardware context that backs the AIE queue.

Change-Id: Ib90e1bc67a8637f6db3ff2bebe34677843796417
Adds support for the packet interface for interacting with
the Embedded Runtime (ERT) on AIE agents. The ERT is what
interprets command packets send to the AIE agent work
queues.

Change-Id: Id28fb98056b2c046354c446bdc9568d74385bea1
Change-Id: If180bdbcb3eb659f0d05a710526864494316d7a9
Change-Id: I799a8223d695ec5c0ea2eaea012bc1b5d877e103
This adds an AMD extension API for configuring a queue's
hardware context. For AIEs the embedded runtime (ERT)
creates a hardware context for a queue that has various
configurable parameters, notably CUs can be configured.

This API could also be used for future GPU HW context
configuration (e.g., it could be used as a general way
to set the CU masks).

Change-Id: I7d1ce36d7ad6830f1b0c867bb2646e6e09cf4845
Adds support for AllocateMemoryOnly inside XDNA driver.

Move the IsLocalMemory() check inside the KFD driver
since the XDNA driver can, and needs to, create handles
on system memory buffer objects.

Changed handle variable name from thunk_handle to user_mode_driver_handle,
which is more representative if we support non-GPU drivers.

Change-Id: I95db9d575afd1ab0ff2de74cea5175d9a12a721b
Storing the correct dev heap size in the memory region.

Change-Id: I14b053330c187da1d7d0213256625e50795b9902
* Add missing info cases to AIEAgent

* Following the single value set from GPUAgent

* AIEs have no caches, no cacheline is reported
* Adding a sideband interface to get a handle from a virtual address. This is just temporary and should be removed when we move to the vmem API

* Removing unused queue structure

* Removing the queue from the arguments of hsa_amd_get_handle_from_vaddr

* Free XDNA BOs

---------

Co-authored-by: Yiannis Papadopoulos <[email protected]>
eddierichter-amd and others added 3 commits September 12, 2024 08:42
…er of packets the queue supports. (#23)

* Fixed workarounds in the AIE soft queue regarding the size of the command chain and the individual commands.

* Added the functionality to aie_hsa_dispatch_test.cc to query the size of the AIE queue and issue the maximum number of packets it supports.

* Some additional small fixes on aie_hsa_dispatch_test.cc test.

* Adding links to driver source
* Freeing the commands and the command chain created during dispatch

* Unmaping and closing cmd BOs as well as freeing the queue ring buffer
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.

5 participants