[code-reflection] RFR: HAT memory mallocs and copies improved [v2]
Juan Fumero
jfumero at openjdk.org
Fri Dec 12 12:14:51 UTC 2025
> Use of `MappableIface` annotations to tag the buffer accessor for OpenCL.
> In addition, this PR reuses buffers attach to each dispatch and copies the data that is needed.
>
> For OpenCL and macOS, this PR in HAT increases performance of up to 30% end-to-end time (including data movement).
>
> Buffer accessors are not available for CUDA, but the CUDA runtime in HAT minimizes the transfers as well as cuda allocations.
>
> How to test? All unit-tests should be passing:
>
>
> java @hat/test-suite ffi-opencl
>
>
> Run violajones:
>
>
> HAT=MINIMIZE_COPIES java -cp hat/job.jar hat.java run ffi-opencl -Dheadless=true violajones
> ```
>
> Run GoL:
>
>
> java @hat/run ffi-opencl life
Juan Fumero has updated the pull request incrementally with one additional commit since the last revision:
[hat] life-example revert control to RO
-------------
Changes:
- all: https://git.openjdk.org/babylon/pull/746/files
- new: https://git.openjdk.org/babylon/pull/746/files/654d1b53..fe11189a
Webrevs:
- full: https://webrevs.openjdk.org/?repo=babylon&pr=746&range=01
- incr: https://webrevs.openjdk.org/?repo=babylon&pr=746&range=00-01
Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 mod
Patch: https://git.openjdk.org/babylon/pull/746.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/746/head:pull/746
PR: https://git.openjdk.org/babylon/pull/746
More information about the babylon-dev
mailing list