Skip to content

Add AbstractTileArray#258

Merged
AntonOresten merged 2 commits into
mainfrom
ao/abstract
Jul 10, 2026
Merged

Add AbstractTileArray#258
AntonOresten merged 2 commits into
mainfrom
ao/abstract

Conversation

@AntonOresten

@AntonOresten AntonOresten commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

This is a minimal PR to allow for some cool downstream things that enable an entirely new separation of concerns when writing kernels.

See #66, #66 (comment)

@AntonOresten AntonOresten marked this pull request as ready for review July 4, 2026 14:25
@AntonOresten AntonOresten force-pushed the ao/abstract branch 2 times, most recently from 6cb59d0 to 9848040 Compare July 10, 2026 18:08
@AntonOresten

Copy link
Copy Markdown
Collaborator Author

Merging this minimal interface per #66 (comment). Not worth documenting in the README for now.

@AntonOresten AntonOresten merged commit daaf65d into main Jul 10, 2026
1 check was pending
@AntonOresten AntonOresten deleted the ao/abstract branch July 10, 2026 20:05
maleadt added a commit that referenced this pull request Jul 10, 2026
Align the kernel-wrapper machinery with Base.Broadcast's vocabulary and
trim the helper zoo introduced by the shape fixes:

- Replace BroadcastLeaf{P} with Extruded{K}, mirroring
  Base.Broadcast.Extruded but with the keep-mask in the type domain
  (it determines the static tile shape). Every array leaf is wrapped,
  so the separate exact-shape load path disappears.
- Replace _to_tiled_bc with preprocess, the counterpart of
  Base.Broadcast.preprocess.
- Drop _bc_result: scalars now convert through a new
  convert(Tile{T}, ::Number) method, and the store site uniformly
  expands with broadcast_to (a codegen no-op for full-shaped tiles).
- Drop _eval_bc_args in favor of a tuple map.
- Move host-memory rejection from a parent-walking blocklist into
  TileArray construction itself: pointer(arr) returning a plain Ptr
  means host memory. This also covers launch() arguments and
  mapreduce, not just broadcast.
- Drop the macro return-value rewrite: materialize! already returns
  the parent array since #258.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
maleadt added a commit that referenced this pull request Jul 10, 2026
Align the kernel-wrapper machinery with Base.Broadcast's vocabulary and
trim the helper zoo introduced by the shape fixes:

- Replace BroadcastLeaf{P} with Extruded{K}, mirroring
  Base.Broadcast.Extruded but with the keep-mask in the type domain
  (it determines the static tile shape). Every array leaf is wrapped,
  so the separate exact-shape load path disappears.
- Replace _to_tiled_bc with preprocess, the counterpart of
  Base.Broadcast.preprocess.
- Drop _bc_result: scalars now convert through a new
  convert(Tile{T}, ::Number) method, and the store site uniformly
  expands with broadcast_to (a codegen no-op for full-shaped tiles).
- Drop _eval_bc_args in favor of a tuple map.
- Move host-memory rejection from a parent-walking blocklist into
  TileArray construction itself: pointer(arr) returning a plain Ptr
  means host memory. This also covers launch() arguments and
  mapreduce, not just broadcast.
- Drop the macro return-value rewrite: materialize! already returns
  the parent array since #258.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant