Skip to content

Comments

Modify range metadata in indexing.jl#3026

Open
SuyashR25 wants to merge 3 commits intoJuliaGPU:masterfrom
SuyashR25:patch-1
Open

Modify range metadata in indexing.jl#3026
SuyashR25 wants to merge 3 commits intoJuliaGPU:masterfrom
SuyashR25:patch-1

Conversation

@SuyashR25
Copy link

Fixes #3024

Update range metadata to include stop + 1.

Update range metadata to include stop + 1.
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic master) to apply these changes.

Click here to view the suggested changes.
diff --git a/src/device/intrinsics/indexing.jl b/src/device/intrinsics/indexing.jl
index ae6f3836e..448d423dc 100644
--- a/src/device/intrinsics/indexing.jl
+++ b/src/device/intrinsics/indexing.jl
@@ -24,7 +24,9 @@ export
 
             # attach range metadata
             range_metadata = MDNode([ConstantInt(Int32(range.start)),
-                                     ConstantInt(Int32(range.stop + 1))])
+                    ConstantInt(Int32(range.stop + 1)),
+                ]
+            )
             metadata(idx)[LLVM.MD_range] = range_metadata
 
             ret!(builder, idx)

Copy link
Author

@SuyashR25 SuyashR25 left a comment

Choose a reason for hiding this comment

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

Issues #3024
Fixed metadata range stop to stop + 1

Copy link
Member

@maleadt maleadt left a comment

Choose a reason for hiding this comment

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

This seems to break things spectacularly, throwing an error from the _index generated function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Indexing range metadata is set up wrong

2 participants