Skip to content

Store ROCArray offset in bytes instead of elements#898

Merged
maleadt merged 1 commit intomasterfrom
tb/offset
Apr 10, 2026
Merged

Store ROCArray offset in bytes instead of elements#898
maleadt merged 1 commit intomasterfrom
tb/offset

Conversation

@maleadt
Copy link
Copy Markdown
Member

@maleadt maleadt commented Apr 10, 2026

The element-based offset was lossy when materializing reinterpret on views with non-aligned offsets (e.g., reinterpreting a view of Int32 as Int64). The byte offset would get truncated by integer division when converting to the new element count.

x-ref JuliaGPU/CUDA.jl#2980

The element-based offset was lossy when materializing reinterpret on
views with non-aligned offsets (e.g., reinterpreting a view of Int32
as Int64). The byte offset would get truncated by integer division
when converting to the new element count.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@maleadt
Copy link
Copy Markdown
Member Author

maleadt commented Apr 10, 2026

Merging this so that we can move forwards on the GPUArrays.jl version of this.

@maleadt maleadt merged commit abaabb7 into master Apr 10, 2026
3 checks passed
@luraess
Copy link
Copy Markdown
Member

luraess commented Apr 10, 2026

Thanks!

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.

2 participants