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

[MLIR][GPUToNVVM] Support 32-bit isfinite #131699

Merged
merged 4 commits into from
Mar 18, 2025
Merged

[MLIR][GPUToNVVM] Support 32-bit isfinite #131699

merged 4 commits into from
Mar 18, 2025

Conversation

wsmoses
Copy link
Member

@wsmoses wsmoses commented Mar 18, 2025

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Mar 18, 2025

@llvm/pr-subscribers-mlir-gpu

@llvm/pr-subscribers-mlir

Author: William Moses (wsmoses)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/131699.diff

1 Files Affected:

  • (modified) mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp (+2-2)
diff --git a/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp b/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
index 159a6afd4a917..9e00bb34f4cb4 100644
--- a/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
+++ b/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
@@ -552,8 +552,8 @@ void mlir::populateLibDeviceConversionPatterns(
                                     "__nv_floor");
   populateOpPatterns<math::FmaOp>(converter, patterns, benefit, "__nv_fmaf",
                                   "__nv_fma");
-  // Note: libdevice does not provide `__nv_isfinitef` as of moment of writing.
-  populateOpPatterns<math::IsFiniteOp>(converter, patterns, benefit, "",
+  // Note: libdevice uses a different name for 32-bit finite checking
+  populateOpPatterns<math::IsFiniteOp>(converter, patterns, benefit, "__nv_finitef",
                                        "__nv_isfinited");
   populateOpPatterns<math::IsInfOp>(converter, patterns, benefit, "__nv_isinff",
                                     "__nv_isinfd");

Copy link

github-actions bot commented Mar 18, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Contributor

@ivanradanov ivanradanov left a comment

Choose a reason for hiding this comment

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

Looks good to me

@wsmoses wsmoses merged commit d9c65af into main Mar 18, 2025
8 of 10 checks passed
@wsmoses wsmoses deleted the users/wm/finite branch March 18, 2025 01:11
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.

3 participants