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

[flang][cuda] Update FIROps.td to add $grid_z to CudaKernelLaunch #85318

Merged
merged 3 commits into from
Mar 15, 2024

Conversation

ImanHosseini
Copy link
Contributor

@ImanHosseini ImanHosseini commented Mar 14, 2024

grid can be 3 dimensional. (@clementval)

@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir labels Mar 14, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Mar 14, 2024

@llvm/pr-subscribers-flang-fir-hlfir

Author: Iman Hosseini (ImanHosseini)

Changes

grid can be 3 dimensional.


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

1 Files Affected:

  • (modified) flang/include/flang/Optimizer/Dialect/FIROps.td (+3-2)
diff --git a/flang/include/flang/Optimizer/Dialect/FIROps.td b/flang/include/flang/Optimizer/Dialect/FIROps.td
index 65a86d25333b5d..f4792637f481c0 100644
--- a/flang/include/flang/Optimizer/Dialect/FIROps.td
+++ b/flang/include/flang/Optimizer/Dialect/FIROps.td
@@ -2454,6 +2454,7 @@ def fir_CUDAKernelLaunch : fir_Op<"cuda_kernel_launch", [CallOpInterface,
     SymbolRefAttr:$callee,
     I32:$grid_x,
     I32:$grid_y,
+    I32:$grid_z,
     I32:$block_x,
     I32:$block_y,
     I32:$block_z,
@@ -2463,8 +2464,8 @@ def fir_CUDAKernelLaunch : fir_Op<"cuda_kernel_launch", [CallOpInterface,
   );
 
   let assemblyFormat = [{
-    $callee `<` `<` `<` $grid_x `,` $grid_y `,` $block_x `,` $block_y `,`
-        $block_z ( `,` $bytes^ ( `,` $stream^ )? )? `>` `>` `>`
+    $callee `<` `<` `<` $grid_x `,` $grid_y `,` $grid_z `,`$block_x `,`
+        $block_y `,` $block_z ( `,` $bytes^ ( `,` $stream^ )? )? `>` `>` `>`
         `` `(` ( $args^ `:` type($args) )? `)` attr-dict
   }];
 

@clementval clementval changed the title Update FIROps.td to add $grid_z to CudaKernelLaunch [flang][cuda] Update FIROps.td to add $grid_z to CudaKernelLaunch Mar 14, 2024
@clementval clementval self-requested a review March 14, 2024 22:16
Copy link
Contributor

@clementval clementval left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the update.

pre-commit CI seems to be stuck. Lets see if it runs anytime soon...

@clementval clementval merged commit b4d3c2c into llvm:main Mar 15, 2024
4 of 5 checks passed
@ImanHosseini ImanHosseini deleted the patch-1 branch March 25, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:fir-hlfir flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants