Skip to content

[mlir][bazel] Expose GPUCommonPass.h only by a single target. #86730

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 27, 2024

Conversation

chsigg
Copy link
Contributor

@chsigg chsigg commented Mar 26, 2024

Move GPUOpsLowering.cpp from //mlir:GPUCommonTransforms to //mlir:GPUToGPURuntimeTransforms to match the CMake setup.

Ideally, header files should be used by only one target, but this is hard because CMake is less strict with headers (no layering check). But even with bazel, headers should only be exported once in the hdrs attribute. Other targets may use them in the srcs attribute to avoid circular dependencies.

Move `GPUOpsLowering.cpp` from `//mlir:GPUCommonTransforms` to
`//mlir:GPUToGPURuntimeTransforms` to match the CMake setup.

Ideally, header files should be used by only one target, but this is
hard because CMake is less strict with headers (no layering check). But
even with bazel, headers should only be exported once in the `hdrs`
attribute. Other targets may use them in the `srcs` attribute to avoid
circular dependencies.
@chsigg chsigg requested a review from bchetioui March 26, 2024 20:21
@chsigg chsigg requested a review from rupprecht as a code owner March 26, 2024 20:21
@llvmbot llvmbot added the bazel "Peripheral" support tier build system: utils/bazel label Mar 26, 2024
@chsigg chsigg merged commit f1dff83 into llvm:main Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bazel "Peripheral" support tier build system: utils/bazel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants