Skip to content

[mlir][test][gpu] Migrate CUDA tests to the TargetAttr compilation workflow #65768

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 2 commits into from
Sep 9, 2023

Conversation

fabianmcg
Copy link
Contributor

@fabianmcg fabianmcg commented Sep 8, 2023

Migrate tests referencing gpu-to-cubin to the new compilation workflow using TargetAttrs. The test-lower-to-nvvm pass pipeline was modified to use the new compilation workflow to simplify the introduction of future tests.

The createLowerGpuOpsToNVVMOpsPass function was removed, as it didn't allow for passing all options available in the ConvertGpuOpsToNVVMOp pass.

The LIT configuration was modified to support CUDA tests only when the ptxas & fatbinary tools are present.

NOTE: The tests in test/Integration/GPU/CUDA/sm90 were left unmodified as I couldn't verify they work.

…rkflow

Migrate tests referencing `gpu-to-cubin` to the new compilation workflow using
`TargetAttrs`. The `test-lower-to-nvvm` pass pipeline was modified to use the
new compilation workflow to simplify the introduction of future tests.

The `createLowerGpuOpsToNVVMOpsPass` function was removed, as it didn't allow
for passing all options available in the `ConvertGpuOpsToNVVMOp` pass.

The LIT configuration was modified to support CUDA tests only when the  `ptxas`
& `fatbinary` tools are present.
@fabianmcg
Copy link
Contributor Author

Hey @grypp could you help me migrating & validating SM_90 tests? So far I tested this change in SM_70 & SM_80.

config.available_features.add("host-supports-cuda-runner")
config.enable_cuda_runner_tests = True
else:
config.enable_cuda_runner_tests = False
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should disable these silently. I would rather have this handled in CMake so that the config and the user intent is clear.
For example maybe my bot is misconfigured and I think I am running tests but actually they would just be skipped!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

@fabianmcg fabianmcg requested a review from joker-eph September 8, 2023 20:03
@fabianmcg fabianmcg changed the title [mlir][test][gpu] Migrate CUDA tests to the TargetAttr compilation wo… [mlir][test][gpu] Migrate CUDA tests to the TargetAttr compilation workflow Sep 9, 2023
@fabianmcg fabianmcg merged commit d21b672 into llvm:main Sep 9, 2023
fabianmcg added a commit to fabianmcg/llvm-project that referenced this pull request Sep 9, 2023
fabianmcg added a commit that referenced this pull request Sep 9, 2023
fabianmcg added a commit that referenced this pull request Sep 9, 2023
…tion workflow (#65768)

The revert happened due to a build bot failure that threw 'CUDA_ERROR_UNSUPPORTED_PTX_VERSION'.
The failure's root cause was a pass using "+ptx76" for compilation and an old CUDA driver
on the bot. This commit relands the patch with "+ptx60".

Original Gh PR: #65768
Original commit message:
    Migrate tests referencing `gpu-to-cubin` to the new compilation workflow
    using `TargetAttrs`. The `test-lower-to-nvvm` pass pipeline was modified
    to use the new compilation workflow to simplify the introduction of
    future tests.

    The `createLowerGpuOpsToNVVMOpsPass` function was removed, as it didn't
    allow for passing all options available in the `ConvertGpuOpsToNVVMOp`
    pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants