[code-reflection] RFR: Hat mark buffers 1
Gary Frost
gfrost at openjdk.org
Fri Feb 14 15:37:35 UTC 2025
Ongoing work for moving towards buffer marking to reduce unnecessary copies.
Here mostly infrastructural
We moved buffer status data from the ArgSled to a trailing BufferState section at the end of each Buffer.
The native buffers now are kept in this buffer state section along with marker bits (host dirty, gpu dirty)
OpenCL + Mock + Spirv native backends now have event queues separated from the Kernel (in prep for the buffer to outlive the kernel dispatch)
Changes tested on OpenCL (and Mock).
CUDA Backends very likely broken. I will come back to those.
HIP also. I need to work with AMD to sync the OpenCL changes to HIP backend.
Buffers are still copied in and out on each dispatch.
-------------
Commit messages:
- OpenCL Mock and Spirv implementations now have isolated queues.
- We need to move Queue out of Program because buffers now are allocated a the backend level
- Cleaned up MemorySegment State (java side) using a MemoryLayout.
- Move vendorPtr from ArgSled to tail.
- Allow annotations for RW,RO and WO
- Added Buffer.Tail for accessing mark bits.
Changes: https://git.openjdk.org/babylon/pull/318/files
Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=318&range=00
Stats: 503 lines in 14 files changed: 216 ins; 186 del; 101 mod
Patch: https://git.openjdk.org/babylon/pull/318.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/318/head:pull/318
PR: https://git.openjdk.org/babylon/pull/318
More information about the babylon-dev
mailing list