[code-reflection] Integrated: HAT memory mallocs and copies improved

Juan Fumero jfumero at openjdk.org
Fri Dec 12 13:12:29 UTC 2025


On Fri, 12 Dec 2025 11:33:56 GMT, Juan Fumero <jfumero at openjdk.org> wrote:

> 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

This pull request has now been integrated.

Changeset: df6fb50e
Author:    Juan Fumero <jfumero at openjdk.org>
URL:       https://git.openjdk.org/babylon/commit/df6fb50ec25517c19838fecc2ae6a6ebcb009849
Stats:     117 lines in 15 files changed: 23 ins; 22 del; 72 mod

HAT memory mallocs and copies improved

-------------

PR: https://git.openjdk.org/babylon/pull/746


More information about the babylon-dev mailing list