Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion book/src/puzzle_02/puzzle_02.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ While this direct indexing works for simple element-wise operations, consider:
- What if we need to broadcast one array to another?
- How to ensure coalesced access across multiple arrays?

These questions will be addressed when we [introduce LayoutTensor in Puzzle 4](../puzzle_04/).
These questions will be addressed when we [introduce LayoutTensor in Puzzle 4](../puzzle_04/introduction_layout_tensor.md).
Comment thread
tolgacangoz marked this conversation as resolved.
1 change: 1 addition & 0 deletions problems/p01/p01.mojo
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from memory import UnsafePointer
from gpu import thread_idx
from gpu.host import DeviceContext
from testing import assert_equal
Expand Down
2 changes: 1 addition & 1 deletion problems/p02/p02.mojo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from memory import UnsafePointer
Copy link
Copy Markdown
Contributor Author

@tolgacangoz tolgacangoz Jan 16, 2026

Choose a reason for hiding this comment

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

We didn't need to import memory.UnsafePointer at the first puzzle, thus isn't it built-in?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Even if it's built-in, I think explicitly importing it is still helpful.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree with Devin Review's comment: "Pedagogical clarity: For beginners, fewer imports = less cognitive overhead."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That's a valid perspective. However, I believe beginners could actually experience confusion about where these constructs originate. Those encountering this for the first time are likely new to Mojo entirely. If something isn't a reserved keyword, making its provenance explicit should aid understanding.

from gpu import thread_idx, block_dim, block_idx
from gpu import thread_idx
from gpu.host import DeviceContext
Comment thread
tolgacangoz marked this conversation as resolved.
from testing import assert_equal

Expand Down
2 changes: 1 addition & 1 deletion solutions/p02/p02.mojo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from memory import UnsafePointer
from gpu import thread_idx, block_dim, block_idx
from gpu import thread_idx
from gpu.host import DeviceContext
from testing import assert_equal

Expand Down
Loading