[code-reflection] Integrated: Hat testing buffer marking 1
Gary Frost
gfrost at openjdk.org
Fri Feb 21 15:36:38 UTC 2025
Step 1 using buffer marking to minimize copies.
This works with most samples/examples. We check markings at kernel dispatch time, and if a buffer is still 'device dirty' (meaning the last update to the segment was a kernel dispatch) then we avoid copying back to the device.
This saves 15% or so on violajones
Next step is not writing buffers after each kernel, and lazily pulling from the device if Java code requires the buffer. Plumbing for this is in place, but not turned on yet.
We also need to mark buffers based on kernel usage. I planned to eventually statically analyze kernels. At present I rely on annotations of kernel params @RO, @RW and @WO.
-------------
Commit messages:
- License and whitespace
- Phase one ok.
- Phase one ok.
- Phase one ok.
- Phase one ok.
- Phase one ok.
- Phase one ok.
- Allow opencl modes to be selected from env
- Allow opencl modes to be selected from env
- adding hat implementation to life example (it previously used raw extracted cl)
- ... and 13 more: https://git.openjdk.org/babylon/compare/99339839...e51badd9
Changes: https://git.openjdk.org/babylon/pull/325/files
Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=325&range=00
Stats: 3089 lines in 50 files changed: 1773 ins; 831 del; 485 mod
Patch: https://git.openjdk.org/babylon/pull/325.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/325/head:pull/325
PR: https://git.openjdk.org/babylon/pull/325
More information about the babylon-dev
mailing list