Skip to content

Commit

Permalink
Handle large iotas.
Browse files Browse the repository at this point in the history
  • Loading branch information
athas committed Oct 23, 2023
1 parent 758231c commit 3b9fdf6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed

* Very large `iota`s now work.

## [0.25.6]

### Added
Expand Down
4 changes: 2 additions & 2 deletions src/Futhark/CodeGen/ImpGen/GPU/Base.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,7 @@ iotaForType bt = do

let params =
[ Imp.MemParam mem (Space "device"),
Imp.ScalarParam n int32,
Imp.ScalarParam n int64,
Imp.ScalarParam x $ IntType bt,
Imp.ScalarParam s $ IntType bt
]
Expand All @@ -1358,7 +1358,7 @@ iotaForType bt = do
arr <-
sArray "arr" (IntType bt) shape mem $
LMAD.iota 0 (map pe64 (shapeDims shape))
sIotaKernel arr (sExt64 n') x' s' bt
sIotaKernel arr n' x' s' bt

pure fname

Expand Down

0 comments on commit 3b9fdf6

Please sign in to comment.