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

Failure to build since rocm/hsa addition #373

Closed
newling opened this issue Jan 3, 2024 · 3 comments
Closed

Failure to build since rocm/hsa addition #373

newling opened this issue Jan 3, 2024 · 3 comments
Assignees

Comments

@newling
Copy link
Collaborator

newling commented Jan 3, 2024

Before the patch #367, I could build mlir-air without any rocm/hsa. Now, my build fails with

/home/jamesn/labs/mlir-air/python/../runtime_lib/airhost/include/air_queue.h:12:10: fatal error: 'hsa/hsa.h' file not found
#include "hsa/hsa.h"

I don't want to build the runtime, I am only using the compiler (mlir subdirectory) Can we have an option to just build the compiler?

@stephenneuendorffer
Copy link
Collaborator

This should be checked at cmake time, I think.

@eddierichter-amd
Copy link
Collaborator

Thanks for the note. Erwei was running into this yesterday. So this flow is still not building the runtime, but it still references the headers of the runtime in https://github.com/Xilinx/mlir-air/blob/main/python/AirHostModule.cpp#L14, which now includes hsa.h. So in #377 I added the ability to point to the HSA directory when calling build-mlir-air.sh. But this does require installing ROCr, it is very straightforward here is the documentation: https://github.com/Xilinx/mlir-air/blob/main/docs/building.md and here is the github workflow where we build the ROCm runtime in our CI https://github.com/Xilinx/mlir-air/blob/main/.github/workflows/buildAndTest.yml (Just search ROCm if you want to see each step we do to install ROCr in our CI)

It does feel silly to have to build the runtime components if you are not using the runtime. Is it possible that we don't need to build this AirHostModule.cpp? If so, maybe we can just remove that when building just the compiler and then we wouldn't need to point to any runtime components.

@eddierichter-amd
Copy link
Collaborator

This was fixed in #380. @newling can you close at your earliest convenience? Let me know if there are any other instances of the runtime leaking into the compiler only build flow.

@newling newling closed this as completed Jan 30, 2024
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

No branches or pull requests

3 participants