Skip to content

Commit 548bca2

Browse files
JoeLosermodularbot
authored andcommitted
[Kernels] Use Int thread_idx etc. in examples, demos, and tests (Part 45/N)
Migrate demos and KGEN tests to use the `Int`-returning GPU ID accessors directly instead of `_uint as` or `_int as` import aliases. Also remove now-redundant `Int()` and `UInt()` wrapping around these accessors. MODULAR_ORIG_COMMIT_REV_ID: b654c338a9c15f5d0419e708a081bcf84014eff9
1 parent c571a97 commit 548bca2

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • mojo/stdlib/std/gpu/primitives

mojo/stdlib/std/gpu/primitives/id.mojo

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,10 @@ alias:
322322
from std.gpu import thread_idx_uint as thread_idx
323323
```
324324
325-
To migrate to `Int`, instead import `thread_idx_int` and update uses to reflect
326-
the change to `Int`:
325+
To use the default `Int`-returning accessor, import `thread_idx` directly:
327326
328327
```mojo
329-
from std.gpu import thread_idx_int as thread_idx
328+
from std.gpu import thread_idx
330329
```
331330
332331
This `thread_idx` accessor will change to yielding `Int` values in a future

0 commit comments

Comments
 (0)