Skip to content

[mlir][gpu] Replace MLIR_GPU_TO_HSACO_PASS_ENABLE by more generic one. #84001

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

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion mlir/lib/Dialect/GPU/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ if(MLIR_ENABLE_ROCM_CONVERSIONS)
target_compile_definitions(obj.MLIRGPUTransforms
PRIVATE
__DEFAULT_ROCM_PATH__="${DEFAULT_ROCM_PATH}"
MLIR_GPU_TO_HSACO_PASS_ENABLE=1
)

target_link_libraries(MLIRGPUTransforms
Expand Down
7 changes: 4 additions & 3 deletions mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
//
//===----------------------------------------------------------------------===//

#include "mlir/Config/mlir-config.h"
#include "mlir/Dialect/GPU/Transforms/Passes.h"
#include "mlir/IR/Location.h"
#include "mlir/IR/MLIRContext.h"

#if MLIR_GPU_TO_HSACO_PASS_ENABLE
#if MLIR_ENABLE_ROCM_CONVERSIONS
#include "mlir/ExecutionEngine/OptUtils.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Support/FileUtilities.h"
Expand Down Expand Up @@ -454,6 +455,6 @@ std::unique_ptr<Pass> mlir::createGpuSerializeToHsacoPass(StringRef triple,
optLevel);
}

#else // MLIR_GPU_TO_HSACO_PASS_ENABLE
#else // MLIR_ENABLE_ROCM_CONVERSIONS
void mlir::registerGpuSerializeToHsacoPass() {}
#endif // MLIR_GPU_TO_HSACO_PASS_ENABLE
#endif // MLIR_ENABLE_ROCM_CONVERSIONS