-
Notifications
You must be signed in to change notification settings - Fork 0
Adding soft queue dispatch logic to dispatch commands to AIE agents #2
Changes from all commits
3dd381f
10bf720
025cde5
72b1ea9
7952927
76e8c5c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,7 @@ | |
|
||
#include "core/inc/driver.h" | ||
#include "core/inc/memory_region.h" | ||
#include "core/driver/xdna/uapi/amdxdna_accel.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: shouldn't we be getting this from the kernel somewhere? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is needed for now to ensure core ROCr can at least build on systems that do not have a XRT installed (e.g., the Gerrit test infra currently). Typically, the installer would place this UAPI (user API) header in a known include directory. When using XRT they put this header here: /usr/src/xrt-amdxdna-2.18.0/include/uapi/drm_local/amdxdna_accel.h. The solution for now is just to keep a copy of this header here for now to avoid issues where we cannot find it installed globally on the system. The GPU driver interface also directly includes the kfd_ioctl.h header in the runtime for convenience. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't this in the kernel now though? https://patchwork.kernel.org/project/dri-devel/cover/[email protected]/ Or meant to be? Admittedly in my 6.10.7 I only have that header in places that XRT would've installed it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's in the kernel but only for inclusion by the kernel driver. We need it to be installed somewhere accessible by user-mode. So far the only thing that does that is the XRT installer. I confirmed with Max that this is indeed the only way to get the header. I'd prefer not to use that so this is a solution for now. Eventually, we should get to a point where the driver module installer installs this header. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can make a CMake find_package integration to search for the usual locations of the XDNA driver. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'd need a package to install first. As I said, currently that is only thru XRT which nobody wants to require as a dep here. |
||
|
||
namespace rocr { | ||
namespace core { | ||
|
@@ -69,6 +70,9 @@ class XdnaDriver : public core::Driver { | |
hsa_status_t Init() override; | ||
hsa_status_t QueryKernelModeDriver(core::DriverQuery query) override; | ||
|
||
hsa_status_t GetHandleMappings(std::unordered_map<uint32_t, void*> &vmem_handle_mappings); | ||
hsa_status_t GetFd(int &fd); | ||
|
||
hsa_status_t GetAgentProperties(core::Agent &agent) const override; | ||
hsa_status_t | ||
GetMemoryProperties(uint32_t node_id, | ||
|
@@ -126,10 +130,6 @@ class XdnaDriver : public core::Driver { | |
void *dev_heap_aligned = nullptr; | ||
static constexpr size_t dev_heap_size = 48 * 1024 * 1024; | ||
static constexpr size_t dev_heap_align = 64 * 1024 * 1024; | ||
|
||
/// @brief DRM buffer object handle for the device heap. Assigned by the | ||
/// kernel-mode driver. | ||
uint32_t dev_heap_handle = 0; | ||
}; | ||
|
||
} // namespace AMD | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: why can we target only N-1 columns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline - this is specific to Phoenix (shim DMA missing from 0th col) and needs to be revisited for strix