-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[mlir][Target] Improve ROCDL gpu serialization API #95456
Changes from all commits
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 |
---|---|---|
|
@@ -123,17 +123,12 @@ add_mlir_dialect_library(MLIRROCDLTarget | |
) | ||
|
||
if(MLIR_ENABLE_ROCM_CONVERSIONS) | ||
if (NOT ("AMDGPU" IN_LIST LLVM_TARGETS_TO_BUILD)) | ||
message(SEND_ERROR | ||
"Building mlir with ROCm support requires the AMDGPU backend") | ||
endif() | ||
|
||
if (DEFINED ROCM_PATH) | ||
set(DEFAULT_ROCM_PATH "${ROCM_PATH}" CACHE PATH "Fallback path to search for ROCm installs") | ||
elseif(DEFINED ENV{ROCM_PATH}) | ||
set(DEFAULT_ROCM_PATH "$ENV{ROCM_PATH}" CACHE PATH "Fallback path to search for ROCm installs") | ||
else() | ||
set(DEFAULT_ROCM_PATH "/opt/rocm" CACHE PATH "Fallback path to search for ROCm installs") | ||
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 meant to be a fallback so that the build goes to look in 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. Yes, and the flag is still available, however, having a hard coded value causes issues in windows, as the value is for linux. a better solution would be detecting it with CMake, I'll look into if there's anything like findHip in CMake. |
||
set(DEFAULT_ROCM_PATH "" CACHE PATH "Fallback path to search for ROCm installs") | ||
endif() | ||
message(VERBOSE "MLIR Default ROCM toolkit path: ${DEFAULT_ROCM_PATH}") | ||
|
||
|
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.
Is this because there's a duplicate check? What happens if the AMDGPU backend isn't available?
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.
MLIR_ENABLE_ROCM_CONVERSIONS is already an alias for checking whether AMDGPU is being built or not.